Page 1 of 2

No elemet Found Error although Element is present

Posted: Wed Oct 05, 2011 2:04 pm
by Todor
Hi,
I have the following problem with ranorex.

my test suite contains 5 or more testcases. If i run all of them in a row, i get following error:
No element found for path './/span[@innertext='SLA' and @tagname='span']'.
I reconstructed the testcase by doing as the Testcase does and looked for the element with the spy.
I found the element and the properties of it and they are unique so i can exclude the fact, that there are two elements with the same properties. I have run it a few times, and i get this error only in this testcase.

Now, the strange thing is, that if i run this very one testcase allone, without the testcases before, i dont get this error and everything works fine.

Any suggestions on how to fix this problem?
If you require more information (Snapshots etc.) let me know

With kind regards

Re: No elemet Found Error although Element is present

Posted: Wed Oct 05, 2011 2:35 pm
by Support Team
Hi,
Todor wrote:Any suggestions on how to fix this problem?
If you require more information (Snapshots etc.) let me know
Could it be possible that the timeout is to short to search for this element during the runtime? A Ranorex Snapshot of the working and non working version would be great. To create a Ranorex Snapshot during runtime please take a look to following post
http://www.ranorex.com/forum/create-sna ... t2447.html

Thanks in advance.

Regards,
Peter
Ranorex Team

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 11:29 am
by Todor
Okay, I have created the not working one. After the snapshot is created I get following error:
No element found for path './/a[@innertext='TestSLA']'.
I found the element it was looking for in the snapshot and checked the values. They are, according to the Snapshot the same as the ones, the program asks for.

I will now create the second snapshot, but you can look for errors in meantime if you want to.


with kind regards

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 12:03 pm
by Todor
It 's not working at all atm.. I don't undedrstand this, timeouts @ elements which are there. Timeout is 1,5 Minutes btw.
....

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 1:04 pm
by Support Team
Hi,
Okay, I have created the not working one.
But I can find the two elements in the Snapshot.
/dom[@domain='sps2010test01:8888']//span[@innertext='SLA' and @tagname='span']
/dom[@domain='sps2010test01:8888']//a[@innertext='TestSLA']
Please try to use "//" instead of ".//".
Also try to run all those Test Cases which are normally executed first and then perform all the steps of the "Error" Test Case and take a look at the specific element which cannot be found.

Regards,
Markus
Ranorex Support Team

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 1:23 pm
by Todor
Also try to run all those Test Cases which are normally executed first and then perform all the steps of the "Error" Test Case and take a look at the specific element which cannot be found.
I have tried that one. When i got to the point, where the error occurs, i stopped the programm and used the spy to find the element. And i found it. I then checked the properties of it (innertext / tagname) and they are the same as in the programm. I also tried to find the element by enable "Highlight Elements" while using the spy and then looking for "/dom/.//a[@innertext='TestSLA']" and the desired element was highlighted.

I will try using // instead of .// and hope that it will solve my problem.

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 2:01 pm
by Support Team
Hi,

If not try to make a snapshot of the root element at runtime with the specific Code Module Peter mentioned before.

Regards,
Markus
Ranorex Support Team

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 2:17 pm
by Todor
I guess by root element you mean the /dom element? I have made the Snapshot with the /dom element ;)

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 2:20 pm
by Support Team
Hi,

No please create a snapshot during the runtime and not with spy
http://www.ranorex.com/forum/create-sna ... t2447.html

Regards,
Peter
Ranorex Team

Re: No elemet Found Error although Element is present

Posted: Thu Oct 06, 2011 3:03 pm
by Todor
The snapshot i attached was created by the module and as variables i used the following global parameters:
ElementPath = /dom
name = Snap01full

Re: No elemet Found Error although Element is present

Posted: Fri Oct 07, 2011 10:55 am
by Support Team
Hi Todor,

Okay, then this is strange because we can find the elements in your snapshot. Did you try the suggestion of Markus?

Regards,
Peter
Ranorex Team

Re: No elemet Found Error although Element is present

Posted: Fri Oct 07, 2011 11:58 am
by Todor
Okay, then this is strange because we can find the elements in your snapshot.
I know, thats why i think that the subject of this thread is very accurate :)

Did you try the suggestion of Markus?
I did, but it didn't work so i rewrote the whole code module, which was quite an exhaustive work. In the end it worked, but i am sitll wondering why ranorex wasn't able to find the element.

Re: No elemet Found Error although Element is present

Posted: Mon Oct 10, 2011 9:36 am
by Todor
Now it's getting ridiculous.... i get more and more errors like this and i dont know why. But thats not the only problem i am facing. Ranorex is getting slower and slower each time i start it for testing purposes. Do you have any idea why ranorex is that slow, or why i am getting this error message because it really starts bothering me.

*UPDATE:
The Error was not caused by Ranorex. We found out that the error that caused the problem was an error on the AUT. Sorry having bothered you.

with king regards,
Konstantin Todor

Re: No elemet Found Error although Element is present

Posted: Mon Oct 10, 2011 12:10 pm
by Support Team
Hi,
Todor wrote:The Error was not caused by Ranorex. We found out that the error that caused the problem was an error on the AUT. Sorry having bothered you.
Depends this slowing down now on Ranorex or not? Because of your update it seems that you found a bug in your software. :)

Regards,
Peter
Ranorex Team

Re: No elemet Found Error although Element is present

Posted: Tue Oct 11, 2011 7:46 am
by Todor
Yeah but the error in the AUT turned out to be not that important for whats going on, AND we are testing with ranorex so we CAN fin errors like this :) . there is still something we are puzzeling about:

I usually work on the server which has normally enough processing power and Ram. Since one week ago the server slows down rapidly which is why ranorex is not able to find any more elements although you can find them with the spy. Currently we are puzzeling about what is causing this slow down. We asume that one of the programms running (Ranorex included) could be a potential suspect. The problem is that one of the programms is using too much ram, which is why the server slows down.