Error on invoke script event command

Phuong

I have the test steps below:
-click “Add” link
- a pop-up window displays
-select some data on pop-up
-click “OK” link to close pop-up, then the data on pop-up will be reflected on main window

Currently my application under test behavior is after clicking “OK” link, a JavaScript is called to load the data in the pop-up to main window. In my test script, I used lnkOK.Click() command to stimulate the mouse click action but the JavaScript is not called (the data is not added from the pop-up to the main window). Therefore, I used the invoke script event to call the script as below:

Cody

The lnkOK.Click() call also internally calls InvokeEvent. Thus manually calling InvokeEvent afterwards is actually redundant. What is probably happening is when you call InvokeEvent the browser is still busy processing the first event.

To overcome this I recommend using a Mouse Desktop click instead like this:

This replaces your lnkOK.Click() call along with anything else you are trying to do to make the OnClick event fire. You will see the mouse actually move and click on the link.
Best wishes,
Cody
the Telerik team

Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.