Page 1 of 1

Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 10:30 am
by Lyuba Boerma
HI)
i have an old test with validation step for inner text, which was always running without issues. After i updated to 9.2.0 i have issues with inner text validation in several places.
Via Ranorex Spy i see correct text.
Also during Maintenance mode , on a debug popUp if i click open in a Spy - i also see correct inner Text.
but Ranorex always fail this step. He validate empty value to my text value.
i added A Snapshot of of example element. But also a screenshot for make it more visual.
Don't be confused with "Unspecified" , this is correct string value :)
Smoke_Testing - Ranorex Studio - (32bit) (Administrator) 2019-10-22 11.15.29.png

I hope you could help me to salve this issue

Re: Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 10:36 am
by Lyuba Boerma
during running in Maintenance mode
Maintenance mode 2019-10-22 11.32.44.png

Re: Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 10:40 am
by odklizec
Hi,

Are you using Validate action in recording table or custom code? Could you please show us the problematic recording or code module?

Re: Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 10:46 am
by Lyuba Boerma
i am using a Recording module
I attached it (hoop you can open)
All_test_Cases - Ranorex Studio - (32bit) (Administrator) 2019-10-22 11.45.42.png

Re: Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 11:07 am
by odklizec
Hi,

Please post also entire xpath for CurrentLocation element. My guess is, that the xpath returns more than just one unique element?

PS: I just again examined the snapshot you posted, and it's exactly what I thought. There are two elements with the same ID, where one of them is invisible and has empty InnerText.
storageLocation.png
To fix the problem, you must add [@visible='True'] at the end of 'CurrentLocation' xpath in repository.

Re: Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 12:33 pm
by Lyuba Boerma
Hmmm interesting)
Thanks your solution helps.
Just wonder why i never faced it before. ))

Re: Validate Inner Text Issues (after Update)

Posted: Tue Oct 22, 2019 12:42 pm
by odklizec
Most probably a pure luck you did not experience this problem before? ;) Either this, or the invisible element has been added recently?

Anyway, in case of xpath returning multiple elements, Ranorex always picks the first one found. And I’m afraid, the order of returned elements could be completely random. So you should always evaluate each recorded xpath and assure it returns just one unique element.