Validate action randomly fails

Ranorex Spy, Recorder, and Studio.
Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Validate action randomly fails

Post by Florian » Tue Jul 31, 2012 4:56 pm

Hello,

I am facing a weird issue: on my website, I am validating some elements to be sure they exist. I am also doing this with cross-browser testing. Running the test on Chrome and Firefox works well. But now I am running the test on Internet Explorer (IE9) and I have some issues.

Some of the validate actions fail. Nevertheless the checked element exists. Once the report is displayed in Ranorex studio, I check the large red line with the following description "Element for item 'DansLaMemeThematique' does not exist (Web element is invalid)" and click on the button above "Jump to item". Once I am in the test case, seeing the repository, the green box around the item appears in the browser...

How the action can fail if the element exists??
Moreover, if I run again the test case, it will fail on another step... It's really weird!! Anyone can help me??

To inform you, I am using Ranorex Studio 3.3.0.17843 under licence, Windows Server 2008 R2 Standard, and IE9. I am working with Remote Desktop Window and it worked well up to now.
I unchecked the box "Use asynchronous dispatching of mouse and keyboard events" and tried the tip found here : http://www.ranorex.com/forum/click-issu ... t3418.html

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Validate action randomly fails

Post by Ciege » Tue Jul 31, 2012 7:20 pm

Sounds like a timing issue possibly.

1) try extending the wait time for how long it takes to validate the element exists.

2) Post a snippet of your code that does the validation so we can have a look and potentially see any other issues.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Re: Validate action randomly fails

Post by Florian » Wed Aug 01, 2012 8:06 am

The thing is Ranorex does not wait the timeout, it fails directly from the beginning.
Find attached a screenshot of the test case. There is no code, only visual actions.
Attachments
ranorex_issue.PNG
ranorex_issue.PNG (112.78 KiB) Viewed 1898 times

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Validate action randomly fails

Post by Ciege » Wed Aug 01, 2012 4:21 pm

Yeah, I don't use the recorder so I am not exactly sure where you tell Ranorex to wait longer on the Validate...

What is the error message you get when the validate fails? Is there something like could not find element within xxx seconds?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Re: Validate action randomly fails

Post by Florian » Wed Aug 01, 2012 4:26 pm

Here is what I got:

Code: Select all

Module execution was aborted because a validation step has failed. Element for item 'DansLaMemeThematique' does not exist (Web element is invalid.). 

Code: Select all

à Ranorex.Validate.IsTrueInternal(Boolean condition, String message, Options options, RepoItemInfo itemInfo) à Ranorex.Validate.Exists(RepoItemInfo itemInfo, String message, Options options) à Ranorex.Validate.Exists(RepoItemInfo itemInfo) à scenariiVB.scenariiVB.SEO.Run() dans C:\Users\f.brouillet\Documents\Ranorex\RanorexStudio Projects\scenariiVB\SEO.vb:ligne 99 à Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)
It's weird because, as I said, if I run again the test case, it will pass this step and fail on another one.

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

Re: Validate action randomly fails

Post by Support Team » Thu Aug 02, 2012 12:05 pm

Hi,

This seems to be a problem which we have fixed with the actual version 3.3.1 (release notes: "Fixed IE object recognition issue causing exceptions searching by UID and web elements being invalid").
Can you please update and check if the issue is fixed with 3.3.1?

Thanks,
Markus
Ranorex Support Team
.
Image

dochoa
Posts: 29
Joined: Tue Jul 16, 2013 11:36 pm

Re: Validate action randomly fails

Post by dochoa » Tue Jul 16, 2013 11:47 pm

Hi Support Team,

I am having pretty much the same issue mentioned above while doing a trial of the product with version 4.0.5.24508, IE 10, and Windows 7.

Here is what I am doing:
I am on an login screen in IE
1) I enter a invalid username and password and verify the following
- The login failure message is displayed
- The Inner Text of the login failure message
2) The test passes above validation and moves on
3) Still on the same screen I have the test enter a valid username and invalid password and submit the form again
4) The same text as before remains on screen but the test fails
5) Using the spy and other tools everything looks correct so the failure is unexplained
6) Try to test in Chrome and everything works great, but I have to test this product in IE so that is not a solution

I really like to buy this so far, but this one issue might stop that.

Thank you.
Last edited by dochoa on Wed Jul 17, 2013 12:10 am, edited 1 time in total.

dochoa
Posts: 29
Joined: Tue Jul 16, 2013 11:36 pm

Re: Validate action randomly fails

Post by dochoa » Wed Jul 17, 2013 12:06 am

Hello,

To add to my previous message:

If click compatibility mode (near URL in IE) off then on (or on then off, can't really tell), close the browser and then run the test everything passes.

So it seems something about compatibility view causes this issue.

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

Re: Validate action randomly fails

Post by Support Team » Thu Jul 18, 2013 2:44 pm

Hi,

For me it looks like the RxPath of some web elements change in dependence on the compatibility mode.
In order to be sure you could create two Ranorex snapshot files of the root element of your web page (of the dom object), one if the compatibility mode is turned on and one if it is turned off, and check if there are any differences between the RxPaths of the elements.
Following link will show you how to generate a snapshot file: Creating Ranorex Snapshot Files.
Are there any differences?

Regards,
Markus
.
Image

dochoa
Posts: 29
Joined: Tue Jul 16, 2013 11:36 pm

Re: Validate action randomly fails

Post by dochoa » Thu Jun 19, 2014 10:58 pm

Hi Markus,

I am over the issue, sorry for the slow reply. There was a lot of time between demoing the tool to getting the company to actually by it and in that time I did not check for replies. I know how to get notified now.

Thank you for the support.