Page 1 of 1

Cannot find element at runtime

Posted: Fri Feb 04, 2011 12:12 pm
by WajdaW
I have problem finding webElement in runtime. When I run my test, ranorex can find some elements at beginning of test such as: button, combobox, etc...
But when comes to some TdTag element in /dom it cannot find it.
When I search for this element using ranorex spy, or run some test using ranorex recorder element is normally found, but within code when tests are ran from Nunit this element cannot be found. I am using ranoex repository class to access element.
I also tried to copy RxPath from recorder into my code and still won't find element...
It throws following message:
Ranorex.ElementNotFoundException : Failed to find item 'RF_Report.TabView.PresentationView_Tab' within the specified timeout of 1m.
----> Ranorex.ElementNotFoundException : The folder 'RF_Report' was not found within the specified timeout of 1m.

The search time of one minute is more than enough, element should be found in 2-3 seconds.

Also I should say that this was working normally few days ago...

Regards,

Vajda Vladimir

Re: Cannot find element at runtime

Posted: Fri Feb 04, 2011 8:48 pm
by Support Team
Hello Vladimir,

Do you use [RequiresSTA] as described in http://www.ranorex.com/blog/using-nunit ... -execution.

What did you change since the time it worked?

Regards,
Roland
Ranorex Support Team

Re: Cannot find element at runtime

Posted: Fri Feb 04, 2011 9:17 pm
by WajdaW
No I haven't used [RequiresSTA] earlier and it worked fine.
I wish I remember what I have changed...
I made same project from my earlier version and it works, it find element. Than I copied all my new code into that project and now I have two projects, one that works and other that doesn't. The code is same in both...
I cannot explain what is happening, I'm trying to fix this since morning 10, that about 11 hours...

Do you have any idea why in one case I find element with absolute path, and in another I don't?
The path is same.

Re: Cannot find element at runtime

Posted: Fri Feb 04, 2011 9:45 pm
by Support Team
So you say, with making new project and everything, now it works again?

Regards,
Roland
Ranorex Support Team

Re: Cannot find element at runtime

Posted: Fri Feb 04, 2011 10:19 pm
by WajdaW
Yes, I used my old solution and just changed 2 projects and with my new code.
I still don't know reason for not working first time, but I am suspecting on some libraries.
Just now I must organize that offline project to update SVN from it.
I hope I won't have that problem again.
I'll see tomorrow if everything is as expected (it is working with absolute path now, I haven't tried with ranorex repository yet)
As it from now, I'll be much more cautious when changing parts which affects elements search...

Regards,

Vajda Vladimir

Re: Cannot find element at runtime

Posted: Sat Feb 05, 2011 3:07 pm
by WajdaW
Now it's everything working as expected.