Frustrating object identifications and item property...
Posted: Wed Jul 08, 2015 12:35 pm
Hi guys,
I've been having this issue with Ranorex finding objects on our webpage.
This is so confusing and i don't know why it's keep happening and always random behaviors so wonder if you guys can help finding the issue or push me into right direction?
The way i have setup my tests is that whenever it clicks, navigates to pages etc always verifies the object is shown and exists. But the issue is that sometimes Ranorex reports the item is visible while other times it says its not visible even tough its there on screen. This is making all my tests so fragile and not safe at all since i have 50-50 chance that it will pass or fail even tough it should always pass.
I've tried many way to fix this:
I mean all this should give me the item as shown 100% always the time right unless i'm missing something really obvious here. Anyone else having similar issues or solved it?
I mean i can fix the problem by adding manual delays all over the places, but i hate that and dont want to use it at all. There has to be away for me to say to Ranorex, click here and wait till you see the title on next page and then move on etc... I've built this customs in Selenium and it works perfect while Ranorex is giving me a headache.
I'm using latest Ranorex version and firefox latest version
I've been having this issue with Ranorex finding objects on our webpage.
This is so confusing and i don't know why it's keep happening and always random behaviors so wonder if you guys can help finding the issue or push me into right direction?
The way i have setup my tests is that whenever it clicks, navigates to pages etc always verifies the object is shown and exists. But the issue is that sometimes Ranorex reports the item is visible while other times it says its not visible even tough its there on screen. This is making all my tests so fragile and not safe at all since i have 50-50 chance that it will pass or fail even tough it should always pass.
I've tried many way to fix this:
Code: Select all
ex:
itemInfo.WaitForExists(duration);
itemInfo.WaitForNotExists(duration);
Custom methods where it takes an item/adapter as parameter or repoiteminfo and loops through while for an x amount of times till it finds before moving on or fails.
bool found = Host.Local.TryFindSingle<Ranorex.InputTag>(path, 10000, out item);
bool found = Host.Local.TryFindSingle(path, 10000, out item);
*path in differentstyles, like wholepath, or simple, or just the item path:
"//legend[@innertext='sometext']"
".//legend[@innertext='sometext']"
bool validate = Validate.NotExists(elementPath, new Duration(timeout), "Check Object '{0}'",new Validate.Options(false, ReportLevel.Info));
var element = Host.Local.FindSingle(path, timeout);
if(element.visible) etc..
I mean i can fix the problem by adding manual delays all over the places, but i hate that and dont want to use it at all. There has to be away for me to say to Ranorex, click here and wait till you see the title on next page and then move on etc... I've built this customs in Selenium and it works perfect while Ranorex is giving me a headache.
I'm using latest Ranorex version and firefox latest version