Ranorex - Call keyword after each step

Ask general questions here.
aumohanraj
Posts: 9
Joined: Mon Jun 06, 2016 10:29 am

Ranorex - Call keyword after each step

Post by aumohanraj » Mon Jun 13, 2016 12:16 pm

Hi,

I am testing the web application. In which i need to execute each step once the page is loaded. Ranorex executes the steps once the target element is visible.

i created keword using WaitForDocumentLoaded() command and it works. But i need to call this keyword after each step.

Is there any way to call this keyword after executing each step?

Thanks,
Mohanraj Kesavan

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

Re: Ranorex - Call keyword after each step

Post by Support Team » Tue Jun 14, 2016 9:52 am

Hello Mohanraj,

Unfortunately, it is not possible to perform WaitForDocumentLoaded() after any step, but you could simply write your own user code method which does so. Information on how to create user code methods can be found here: user code actions

This method/action would simply contain your next test step, plus the WaitForDocumentLoaded() method.

I hope this information helps.

Sincerely,
Robert
.
Image

aumohanraj
Posts: 9
Joined: Mon Jun 06, 2016 10:29 am

Re: Ranorex - Call keyword after each step

Post by aumohanraj » Wed Jun 15, 2016 8:24 am

Hi Robert,

Thanks for your reply.

Assume that we have created the user code action/method with waitfordocumentLoaded().
Do we need to include this user code action after each step to pause the execution until the page is loaded?

Is there any way to automatically call this action after execution of each step? I Believe inserting the same keyword after each step is not the good approach.

Thanks,
Mohanraj Kesavan

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

Re: Ranorex - Call keyword after each step

Post by odklizec » Wed Jun 15, 2016 11:17 am

Hi,

There is definitely no automatic way to wait for something between each step. So if you need to wait for something before/after each step, you will have to explicitly add such wait before/after each command.

If you need to continue with next step after an element becomes visible, then I would suggest to add @visible="True' to the element (its xpath in repo) you are waiting for and then add WaitForExists action before action you want to call. This should make sure the next action is not fired before the element becomes visible.
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