Page 1 of 1

How to ensure each click take effect

Posted: Thu Oct 30, 2014 8:00 am
by mumu
Can anyone please help me out - How to ensure each .click() is execute after the webpage is finish/complete loading ?

Re: How to ensure each click take effect

Posted: Thu Oct 30, 2014 6:12 pm
by CookieMonster
Can please describe a little more in detail what you exactly you want to do!
Are you working with Ranorex Recording Modules or are you using the API?

Because normally after a click something happens on the webpage.
For e.g Click on Checkbox, after the click, the CheckBox is set or not. And this can be validated after the click, with the validate function.

Re: How to ensure each click take effect

Posted: Thu Nov 27, 2014 5:40 pm
by pkaraya
Hi,
This is what has worked for me:
Validate.Exist(repoitem);;
repoitem.focus();
repoitem.MoveTo();
repo.item.Click();

Re: How to ensure each click take effect

Posted: Fri Nov 28, 2014 10:20 am
by keith
Basically CookieMonster hit it. Your question doesn't really provide enough information to go on. The idea is the same though. The easiest way to see if a click actually happened is to do a validation step afterwards that checks what is supposed to happen as a result of the click.

This has helped me because it is easier to find out what went wrong in the report because the module fails in the module rather than somewhere later in another module.

Using the standard functions in Ranorex Studio. (Use equivalent API functions if you meant the API).
Action Mouse Click -thing to click-
Validation Exists -something that should exist after the click-

If you are looking for something different you will need to explain better what you want to do.