Big issue with Data Drive Test in Chrome

Bug reports.
c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Big issue with Data Drive Test in Chrome

Post by c676228 » Wed May 13, 2015 7:50 pm

Hi,

I have been experienced big issue with data drive testing, especially with Chrome(version 42.0.2311).
It's been happening many many times to me, though I cannot guarantee it happens to me every time. Occasionally I see the similar problem in Firefox.

The issue is: the progression bar at the right hand corner, racing to run every data entry step. It seems everything runs ok, no error is reported from progression bar. However, the page is not even loaded yet and no action can been seen from end user, no data has been entered at all or sometimes entered to some data fields. It is only stalling at one point at certain steps of the iteration or even the next iteration. It will report all the skipped steps successful or even the first iteration is successful. Actually it is failed. It seems occurring more often when code in switching between recording module and user code.

I am wondering if anybody else there has the similar experience.

Ranorex: 5.3.2.23378
OS: Windows 8

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Big issue with Data Drive Test in Chrome

Post by odklizec » Thu May 14, 2015 6:51 am

Hi,

I'm not sure I understand what exactly is your problem. From the description it seems like a timing issue? If I got it right, the test steps are started before the page is even ready? So I think you need to add some WaitFor Exists actions eventually, WaitForDocumentLoaded method before starting your tests?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Big issue with Data Drive Test in Chrome

Post by krstcs » Thu May 14, 2015 4:36 pm

I agree with Pavel, it sounds like you need to force Ranorex to wait for a completed load of the webpage.

The easiest way to do it is to add " and @state='complete'" to your top-level "/dom" repo object. This will force Ranorex to search for the dom and only find it when it is actually in the complete state.

If your xpath looks like this: /dom[@domain='www.mydomain.com']
Then after this it would be: /dom[@domain='www.mydomain.com' and @state='complete']

As long as all of your objects are under this parent, they will ALL be forced to wait for the page to complete, no matter the page.
Shortcuts usually aren't...

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Big issue with Data Drive Test in Chrome

Post by c676228 » Thu May 14, 2015 5:02 pm

In the recording module/user code, when a web page is switch from one to another. I always use ensurevisible or Waitfor Exist for the first UI element of the page. Apparently it seems that is not enough or it doesn't do the job consistently.

So you mean just add @state='complete' in the xpath to the top level repo item? I will definitely try to use state property and WaitForDocumentLoaded method and test it in different browsers. I will let you know.

Thanks so much.
Betty

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Big issue with Data Drive Test in Chrome

Post by c676228 » Thu May 14, 2015 6:28 pm

I use the following xpath for the top repo item:
/dom[@domain='mydomain.com' and @state='complete']. It seems not helping.
so I also tried:
//modalDialog is DivTag
var modalDialog = repo.GroupsAdministration.AddGroupModalDialog.ModalDialog;
WebDocument modalDialogDocument = new WebDocument(modalDialog.Element);
modalDialog.EnsureVisible();
modalDialogDocument.WaitForDocumentLoaded();

I got an exception since divTag doesn't support WebDocument. I want to wait this Modal Dialog is completely loaded before doing anything else(since using ensurevisible of the first input field o of this modal dialog is not working). The modal dialog is a div on the top of its original web page(tab), not a completely new web page.

Any other options?

Betty

afleitas
Certified Professional
Certified Professional
Posts: 26
Joined: Thu May 14, 2015 3:57 pm

Re: Big issue with Data Drive Test in Chrome

Post by afleitas » Mon May 18, 2015 4:59 pm

Looks like it would be beneficial for you to validate that element before performing an action on it. So something like:
// Using 'Info' objects for validation
// Throws a Ranorex.ValidationException if validation
// fails. Automatically reports success or failed message
// to log file

Validate.Exists(repo.SaveDialog.ButtonOKInfo);

This will ensure that the element in your divTag exists before performing an action on it.

Let me know if this helps.
Normal people... believe that if it ain't broke, don't fix it. Engineers believe that if it ain't broke, it doesn't have enough features yet.
-Scott Adams :)