Page 1 of 1

Ranorex Cannot Find Element in .NET Desktop Application

Posted: Mon Jun 19, 2017 4:27 pm
by corissa
Hello there Ranorex folks,

I am running my company's program on:
Windows 10 Pro,
Ranorex Version 7.0.1, with .NET Runtime Version 4.0.30319.42000

Currently I am attempting to make an automated test that will click on of these checkboxes on the left, so that I can access the hidden menu that will then appear. For some reason, Ranorex cannot find this element. I even set it to look for a full 90 seconds, and it still could not "see" the checkbox. I've tried "press" instead of click, and even a long delay for the box to load properly, but neither has worked. I'm at a loss for what to do at this point.

The RanoreXPath of the checkbox is: ?/?/list[@accessiblename='BullMoose Warehouse']/checkbox[@accessiblename='BM Store ME']

Attached is a snapshot of my application. Any help you can provide would be wonderful. :) Thanks in advance!
~Corissa

Re: Ranorex Cannot Find Element in .NET Desktop Application

Posted: Mon Jun 19, 2017 5:44 pm
by Vaughan.Douglas
by having ?/? at the start of your RxPath, you're forcing Ranorex to search EVERYTHING starting at host. Try something like

Code: Select all

/form[@controlname='DesktopRibbonForm']//form[@controlname='EmployeeList']/container[@controlname='splitContainerControl1']//element[@controlname='storeVisibleListBox']//checkbox[@accessiblename='BM Store ME']

Re: Ranorex Cannot Find Element in .NET Desktop Application

Posted: Mon Jun 19, 2017 6:30 pm
by corissa
Hi Vaughan.Douglas, thanks for your input.

I tried to go in and change the RanoreXpath, but it looks like the beginning part is all grayed out, and I can't edit it. I cannot remove the ??

I've attached a screenshot to show you, and would appreciate any more advice you can give. Thanks again for your time and attention to this issue.

Re: Ranorex Cannot Find Element in .NET Desktop Application

Posted: Tue Jun 20, 2017 7:38 am
by odklizec
Hi,

The grayed part means that this particular part of xpath belongs to a parent element. So you have to go to that element (in repo) and change the xpath there. Hope this helps?

Re: Ranorex Cannot Find Element in .NET Desktop Application

Posted: Tue Jun 20, 2017 12:53 pm
by corissa
odklizec wrote:The grayed part means that this particular part of xpath belongs to a parent element. So you have to go to that element (in repo) and change the xpath there. Hope this helps?
Ahhhh, I see! Thanks so much! I'll try that.