Cannot find element at runtime

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
WajdaW
Posts: 75
Joined: Wed Jan 05, 2011 6:45 pm

Cannot find element at runtime

Post by WajdaW » Fri Feb 04, 2011 12:12 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Cannot find element at runtime

Post by Support Team » Fri Feb 04, 2011 8:48 pm

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
.
Image

WajdaW
Posts: 75
Joined: Wed Jan 05, 2011 6:45 pm

Re: Cannot find element at runtime

Post by WajdaW » Fri Feb 04, 2011 9:17 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Cannot find element at runtime

Post by Support Team » Fri Feb 04, 2011 9:45 pm

So you say, with making new project and everything, now it works again?

Regards,
Roland
Ranorex Support Team
.
Image

WajdaW
Posts: 75
Joined: Wed Jan 05, 2011 6:45 pm

Re: Cannot find element at runtime

Post by WajdaW » Fri Feb 04, 2011 10:19 pm

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

WajdaW
Posts: 75
Joined: Wed Jan 05, 2011 6:45 pm

Re: Cannot find element at runtime

Post by WajdaW » Sat Feb 05, 2011 3:07 pm

Now it's everything working as expected.