Page 1 of 1

Ranorex - Call keyword after each step

Posted: Mon Jun 13, 2016 12:16 pm
by aumohanraj
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

Re: Ranorex - Call keyword after each step

Posted: Tue Jun 14, 2016 9:52 am
by Support Team
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

Re: Ranorex - Call keyword after each step

Posted: Wed Jun 15, 2016 8:24 am
by aumohanraj
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

Re: Ranorex - Call keyword after each step

Posted: Wed Jun 15, 2016 11:17 am
by odklizec
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.