Page 1 of 1

Validate action randomly fails

Posted: Tue Jul 31, 2012 4:56 pm
by Florian
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

Re: Validate action randomly fails

Posted: Tue Jul 31, 2012 7:20 pm
by Ciege
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.

Re: Validate action randomly fails

Posted: Wed Aug 01, 2012 8:06 am
by Florian
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.

Re: Validate action randomly fails

Posted: Wed Aug 01, 2012 4:21 pm
by Ciege
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?

Re: Validate action randomly fails

Posted: Wed Aug 01, 2012 4:26 pm
by Florian
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.

Re: Validate action randomly fails

Posted: Thu Aug 02, 2012 12:05 pm
by Support Team
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

Re: Validate action randomly fails

Posted: Tue Jul 16, 2013 11:47 pm
by dochoa
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.

Re: Validate action randomly fails

Posted: Wed Jul 17, 2013 12:06 am
by dochoa
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.

Re: Validate action randomly fails

Posted: Thu Jul 18, 2013 2:44 pm
by Support Team
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

Re: Validate action randomly fails

Posted: Thu Jun 19, 2014 10:58 pm
by dochoa
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.