How to ensure each click take effect

Ask general questions here.
mumu
Posts: 8
Joined: Sun Oct 26, 2014 8:02 am

How to ensure each click take effect

Post by mumu » Thu Oct 30, 2014 8:00 am

Can anyone please help me out - How to ensure each .click() is execute after the webpage is finish/complete loading ?

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: How to ensure each click take effect

Post by CookieMonster » Thu Oct 30, 2014 6:12 pm

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.

pkaraya
Posts: 5
Joined: Thu Apr 03, 2014 6:32 pm

Re: How to ensure each click take effect

Post by pkaraya » Thu Nov 27, 2014 5:40 pm

Hi,
This is what has worked for me:
Validate.Exist(repoitem);;
repoitem.focus();
repoitem.MoveTo();
repo.item.Click();

keith
Posts: 14
Joined: Thu Nov 27, 2014 2:07 pm

Re: How to ensure each click take effect

Post by keith » Fri Nov 28, 2014 10:20 am

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.
Cheers,
keith