When to set 'SimulateRealClick' property

12 posts, 0 answers
  1. ching ping
    ching ping avatar
    3 posts
    Member since:
    Sep 2010

    Posted 14 Nov 2010 Link to this post

    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.
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Nov 2010 Link to this post

    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!
  3. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 16 Nov 2010 Link to this post

    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 
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 17 Nov 2010 Link to this post

    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!
  5. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 17 Nov 2010 Link to this post

    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?
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Nov 2010 Link to this post

    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
  7. Manjit
    Manjit avatar
    3 posts
    Member since:
    May 2012

    Posted 06 Aug 2012 Link to this post

    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.
  8. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 09 Aug 2012 Link to this post

    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
  9. Manjit
    Manjit avatar
    3 posts
    Member since:
    May 2012

    Posted 09 Aug 2012 Link to this post

    The action is to Click instead of 'LeftClick' so the SimulateRealClick checkbox is available.
  10. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 10 Aug 2012 Link to this post

    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
  11. Nurul Syazwani
    Nurul Syazwani avatar
    2 posts
    Member since:
    Jul 2016

    Posted 04 Aug Link to this post

    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 :)

  12. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    254 posts

    Posted 11 Aug Link to this post

    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
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!