Cell Element Is Visible, But Shown Invisible In Spy

Ask general questions here.
atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

Cell Element Is Visible, But Shown Invisible In Spy

Post by atruon » Tue Aug 08, 2017 9:58 pm

Hello,
I try to get the cell value from a table. I have 6 VMs: 3 Windows 10 and 3 Windows 7. I can get cell value from all Windows 7 and one Windows 10, but cannot get it in the other two Windows 10. I print out the cell text to check if the cell contains the right one. All the VMs that I can get the cell value give me the right text, but those VMs that I cannot get the value give me null. I also check the general in Ranorex Spy and saw that the visible section is false for all VMs that cannot get the value, but true for those VMs that can get the value. Is there any way that I can make the cell element visible for Ranorex to spy.
Here is my code:
code.PNG
code.PNG (33.96 KiB) Viewed 800 times
Here is the cell element that is invisible:
invisible1.PNG
invisible1.PNG (49.72 KiB) Viewed 800 times
Here is the snapshot of invisible element:
InvisibleDataSource.rxsnp
(24.7 KiB) Downloaded 19 times
Thanks,
Anh

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

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by odklizec » Wed Aug 09, 2017 8:37 am

Hi,

The snapshot you posted shows a technology limitation warning:
technology_warning.png
technology_warning.png (6.11 KiB) Viewed 787 times
This is a most probable source of your issue. Try to run your test/spy with admin privileges a see it if 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

atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by atruon » Wed Aug 09, 2017 4:39 pm

Hi,
I run Ranorex as administrator and I can be able to capture the cell now. You are right. I did not run Ranorex as administrator before. Thank you so much for your help!

atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by atruon » Thu Aug 10, 2017 1:56 am

Hi,
After I ran Ranorex as administrator, I was able to capture the cell inside the table. However, there are two VMs, Windows 10, that gave me an error saying that it cannot find the item, but I add that item from Ranorex Spy.
Image.PNG
Image.PNG (23.1 KiB) Viewed 771 times
image2.PNG
The cell items captured by Ranorex Spy
image2.PNG (56.31 KiB) Viewed 770 times
image4.PNG
This is the path of the cell item after I added it to the common repository
image4.PNG (26.77 KiB) Viewed 769 times
I even try to use raw text item, but none of them working for any VMs, except my local machine.
Please give me any suggestion.
Thanks,
Anh

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

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by odklizec » Thu Aug 10, 2017 7:58 am

Hi,

Are you sure you have the same Ranorex settings on both desktop and VMs? Don't forget that GDI-related settings are stored in Ranorex settings as well. So please make sure you distribute rxsettings file from the original project across all machines. BTW, are you using a source control system to distribute solution to remote systems? If no, then you should definitely adopt one! This would eliminate any configuration variabilities.

Also, do I understand it right that the two problematic WMs are the only two machines with Win10? It could be that on Win10 the UI structure may be recognized differently. Please upload a Ranorex snapshot both from working and non-working machine and full xpath (the failing one) as stored in repository. Thanks.
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

atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by atruon » Thu Aug 10, 2017 5:12 pm

Hi,
I use a source control system to distribute the solution to remote systems. The two problematic VMs are not the only two machines with Win10. I have my local machine and another machine with Win10 that works, so I have total four machines with Win10. Two works and the other two does not work.
Unfortunately, I cannot give you the snapshot from the two non-working machines because I uninstall Ranorex after each run. However, I can give you the snapshot of working one and a full xpath of the failing one.
Cell.rxsnp
(25.19 KiB) Downloaded 18 times
image5.PNG
image5.PNG (45.79 KiB) Viewed 756 times

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

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by odklizec » Thu Aug 10, 2017 5:35 pm

Hi,

Thanks for clarifying the situation with VMs. Unfortunately, I think that the snapshot from a non-working machine is crucial for understanding what's wrong. My guess is that there is a different version of .net (or something else), which causes a difference in the xpath recognition.
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

atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by atruon » Fri Aug 11, 2017 12:18 am

Hi,
I actually can get the snapshot of the working and non-working machine now. I observe them and dont see anything serious differences between those snapshots.
non-working.rxsnp
(23.97 KiB) Downloaded 21 times
working.rxsnp
(24.68 KiB) Downloaded 21 times

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

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by odklizec » Fri Aug 11, 2017 7:38 am

Hi,

Thanks for the snapshots. OK, they are look pretty similar an I'm able to find the cell in question in both of them (using provided xpath). What I think is the cause of your problem is this:

Code: Select all

/form[@class~'#32770']
Class '#32770' is a very common thing and my guess is that on those two machines, Ranorex actually found a form with class #32770, but this form most probably belongs to a completely different app :)

Just fire up Spy on either of those machines, start your app and then try to find the xpath "/form[@class~'#32770']". My guess is that Ranorex returns two or more apps and your app will not be the first one in the list?

In case of multiple found items (elements with the same xpath), Ranorex ALWAYS picks the first one! So what you need to do is to specify better base xpath. Why don't you use Title or AccessibleName (eventually processname) to uniquely identify your app?
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

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Cell Element Is Visible, But Shown Invisible In Spy

Post by Stub » Fri Aug 11, 2017 8:31 am

I have used @processname in my top level RxPaths to make sure I identify the correct item. I did have to use a variable on that so that I can control the process name - it's different between a fully installed release build and a debug build of our application.

Code: Select all

/form[@processname=$ProcessName and ... etc]