This is a migrated thread and some comments may be shown as answers.

When to set 'SimulateRealClick' property

11 Answers 217 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ching ping
Top achievements
Rank 1
ching ping asked on 15 Nov 2010, 02:53 AM
Hi Telerik team,

I found out that there is a property called 'SimulateRealClick' for any button click or link click. I would like to know when do we need to enable this 'SimulateRealClick' property? I found out that sometimes i will need to enable this property in order for my test steps of clicking link/button to proceed. If i never set this property to true, my test step of clicking button/link will stop and hang there and ends up with 'TimeOut Error'. After i set 'SimulateRealClick' to true, the test is able to run successfully. But for some tests, even if i din't set this property to true, the test is able to run successfully. Pls advice.

11 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 17 Nov 2010, 12:20 AM
Hi ching ping,

When SimulateRealClick is set to False, we will send a Click event directly to the browser and letting the browser do what it wants to with it. This works most of the time for HTML based applications (i.e. not Silverlight applications) so usually SimulateRealClick can be left at False. The few cases where you must have it are:

  1. The click causes a Modal Dialog to open
  2. A JavaScript onClick event handler is attached to the element you are clicking on. The onClick handler usually doesn't get triggered when SimulateRealClick is set to false.

Kind regards,
Cody
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
0
STEVEN
Top achievements
Rank 1
answered on 17 Nov 2010, 01:56 AM
In that case, why did Telerik set it to 'true' by default?
Or should we set it to true at all times since 'false' has its limitation 
0
Cody
Telerik team
answered on 17 Nov 2010, 06:19 PM
Hello STEVEN,

The default setting actually depends on a few factors:

  • If you are recording an HTML based web application, False is the normal default setting.
  • If you are recording a Silverlight based web application, True is the normal default setting.
  • In an HTML based web application, when a button click opens a modal browser window, we will change the setting to True for that one button click step.
Are you experiencing behavior different than the above description? If so please let me know so I can investigate what is happening in your scenario.

Thank you and Best wishes,
Cody
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
0
STEVEN
Top achievements
Rank 1
answered on 17 Nov 2010, 06:23 PM
What is the design rationale for, "If you are recording an HTML based web application, False is the normal default setting."

Why didn't Telerik use 'True' as the default setting?
0
Cody
Telerik team
answered on 22 Nov 2010, 08:42 PM
Hello STEVEN,

Good question Steve.

When it comes to test automation, the general principle to follow is:

  • The fewer the mouse operations the better
  • The fewer the keyboard operations the better

In general, the fewer the UI operations you must perform the more reliable your test automation will be during execution. This isn't a hard and fast rule to follow (every application has it's unique way of operating)... only a recommended guideline.

With that in mind we tried to do as much as possible without using mouse clicks. We have the ability to inject a click event on a specific element directly in the DOM. This works well for most HTML based web applications. It doesn't work on some elements in which there is JavaScript event handling attached to an element. In those few cases we have no choice but to use a real mouse click because injecting a click event into the DOM sometimes does not trigger the JavaScript event handler.

For Silverlight we found that trying to inject click events was very unreliable in general. We wanted our customers to have the best chance of success that once they recorded their test, it would execute correctly and the test would pass. It was our experience that the using real mouse clicks for Silverlight applications was more reliable than trying to inject click events, even though this violates the "the fewer the mouse operations the better" rule to test automation.

This is why the default is different between HTML based applications and Silverlight based applications.

All the best,
Cody
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release 24/7 on Telerik TV
0
Manjit
Top achievements
Rank 1
answered on 06 Aug 2012, 06:17 PM
When I add a step from the element repository for a RadPanel BarItem object, the default behavior is to not have SimulateRealClick checked. However, I already added the control to the repository and I would think it knows its a Silverlight control so it would make sense for SimulateRealClick to be checked.
0
Pavel
Telerik team
answered on 09 Aug 2012, 09:58 AM
Hi,

If I understand correctly, you are adding a click step from the step suggestion panel? If so the action should be "LeftClick", which does not have a SimulateRealClick property. Let me know if I am missing something.

All the best,
Pavel
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Manjit
Top achievements
Rank 1
answered on 09 Aug 2012, 07:12 PM
The action is to Click instead of 'LeftClick' so the SimulateRealClick checkbox is available.
0
Pavel
Telerik team
answered on 10 Aug 2012, 06:00 AM
Hi,

Your screenshot illustrates the actions for the Ajax version of the PanelBar control. The Silverlight version (about which you were talking initially) does not have these actions.

Kind regards,
Pavel
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Nurul Syazwani
Top achievements
Rank 1
answered on 04 Aug 2016, 09:57 AM

Hello Telerik Team,

I want to ask very simple question. May I know where I can learn the term using in TTS? For example, the meaning of "SimulateRealClick", "AjaxTimeOut", "WaitOnElementsTimeout" etc.

 

Thank you :)

0
Elena
Telerik team
answered on 11 Aug 2016, 02:25 PM
Hi Nurul,

Please excuse me for the delay. Here you could find all test step properties along with a short description. I hope you will find further useful information in our online documentation as well. 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
ching ping
Top achievements
Rank 1
Answers by
Cody
Telerik team
STEVEN
Top achievements
Rank 1
Manjit
Top achievements
Rank 1
Pavel
Telerik team
Nurul Syazwani
Top achievements
Rank 1
Elena
Telerik team
Share this question
or