I need help with writing a Neustar WPM script to time the button click until an overlay appears. Here is what my current script looks like:
var webDriver = test.openBrowser();
var selenium = webDriver.getSelenium();
webDriver.get('https://www.mywebsite.com');
selenium.waitForPageToLoad(30000);
// Start logging HTTP traffic and timings
test.beginTransaction();
test.beginStep("Open SignUp");
selenium.click("link=Sign Up");
selenium.waitForElementPresent("name=nextStep");
test.endStep();
test.endTransaction();
I am encountering an issue where the click function does not return immediately and waits for the entire page to load including the overlay. However, I want it to stop as soon as the desired element is visible. How can I modify the script so that selenium.click returns immediately instead of waiting for the entire page to load?