Ranorex Cannot Find Element in .NET Desktop Application

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
corissa
Posts: 20
Joined: Tue Feb 14, 2017 9:11 pm
Location: Portland, Maine

Ranorex Cannot Find Element in .NET Desktop Application

Post by corissa » Mon Jun 19, 2017 4:27 pm

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
Attachments
FieldStackSnapshot.rxsnp
Application Snapshot
(172.66 KiB) Downloaded 24 times
CannotFindElement.png
Screenshot highlighting the element Ranorex cannot find
CannotFindElement.png (28.95 KiB) Viewed 910 times

Vaughan.Douglas
Posts: 250
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: Ranorex Cannot Find Element in .NET Desktop Application

Post by Vaughan.Douglas » Mon Jun 19, 2017 5:44 pm

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']
Doug Vaughan

corissa
Posts: 20
Joined: Tue Feb 14, 2017 9:11 pm
Location: Portland, Maine

Re: Ranorex Cannot Find Element in .NET Desktop Application

Post by corissa » Mon Jun 19, 2017 6:30 pm

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.
Attachments
RanoreXPath.png
RanoreXPath.png (7.7 KiB) Viewed 900 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex Cannot Find Element in .NET Desktop Application

Post by odklizec » Tue Jun 20, 2017 7:38 am

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

corissa
Posts: 20
Joined: Tue Feb 14, 2017 9:11 pm
Location: Portland, Maine

Re: Ranorex Cannot Find Element in .NET Desktop Application

Post by corissa » Tue Jun 20, 2017 12:53 pm

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.