How to do event handling using Ranorex

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
AnishJ
Posts: 4
Joined: Thu Jul 11, 2013 3:34 pm

How to do event handling using Ranorex

Post by AnishJ » Tue Mar 04, 2014 10:22 pm

Hi,

Environment:
Flash/Flex application
Web testing

Scenario/Issue:
Sometimes our test cases failed because of not recognizing the button clicks (elements already identified and added in repository)

Reason:
In our application the mouse pointer turns to busy icon image (flash object) when it takes longer time for page submission/load after an action (for e.g.: Click Edit button).However, Ranorex could not identified this change in the mouse pointer (i.e.; normal pointer to busy icon). So it assumes the Edit button click went through successfully and it starts executing the next step in test case. The next action (for e.g.: Click Save button -identified in repository) starts and Save button not appears in the form (User Interface) as mouse pointer is still busy mode.

Could please advice?


Thanks,
AJ

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to do event handling using Ranorex

Post by Support Team » Wed Mar 05, 2014 4:39 pm

Hello AJ,

I suggest to add a Webdocument.WaitForDocumentLoaded()-method to your recording in order to overcome the timing issue. If the loading is handled within the flash/flex object itself (the page doesn’t reload) please add a Delay()-method to your recording before the next steps are performed.

Regards,
Robert

AnishJ
Posts: 4
Joined: Thu Jul 11, 2013 3:34 pm

Re: How to do event handling using Ranorex

Post by AnishJ » Mon Mar 10, 2014 10:25 pm

Hi Robert,

Thanks for the reply,

Could you please let me know how to add Webdocument.WaitForDocumentLoaded()-method in Ranorex Studio. I could not see this option under Add New Action drop down in Recording Module.
Please advise!

Regards,
Anish

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

Re: How to do event handling using Ranorex

Post by odklizec » Mon Mar 10, 2014 11:03 pm

Hi,

You need to create a new User Code action (via Add New Action drop down), in which you can use the suggested method. Here is how the code should look like...
WebDocument webDoc = @"/dom[@domain='your.webpage.com']";
webDoc.WaitForDocumentLoaded();
Alternatively, you can use Wait For Exists action, but this requires recently released Ranorex 5.0. Last option is to write your own Wait method.
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