Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Double click user action

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
We are recording test cases for the functional test of the application. Our application uses double click user action to make some fields on the page editable, but there is no option for the double click action in the WebKing. Is there any way we can add it?

Thank you for the help.

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Hello Natalia,

    To record a double-click user action in WebKing, use the following steps...

    1) Close WebKing if it's open.

    2) Open the UserCusomizableOptions.js file for the chosen browser. There are two copies of this file (one for IE and Firefox) located under...

    IE: <WebKing Installation Directory>/VERSION#/browsers/ie

    Firefox: <WebKing Installation Directory>/VERSION#/browsers/ff/extensions/wk@parasoft.com/chrome/content

    ...where VERSION# is your WebKing version number (e.g. - 6.0).

    3) Add the following code snippet to the beginning of the UserCustomizableOptions.js file...

    CODE
    BrowserDriver.prototype.doDoubleClick = function(locator) {
    var element = this.findElement(locator);
    HTMLUtil.triggerMouseEvent(element, 'dblclick', true);
    }


    4) Save the modified UserCustomizableOptions.js file.

    5) Re-open WebKing.

    6) Record the web functional scenario, performing the double-click as normal.

    7) The recording will show two separate tests for each click in the double-click performed. Delete one of these tests, and open the configuration panel for the remaining test.

    8) Select the User Action tab.

    9) Change User Action to "Doubleclick".

    10) Use the Element Locator to find the appropriate element to double-click.

    11) Save the project.

    Good luck!

    Regards,
    Adam