Linked Questions

Popular Questions

"return document.readyState" in Jmeter WebDriver Sampler, in JavaScript

Asked by At

I am quite new in Selenium and WDS in Jmeter, so please help me. I can not write a code, wait until the entire page loads. I found something like "return document.readyState", but I can not do it in my code. So I said - I'm quite green in this.

I have "wait" in my code but it is not enought.

var pkg = JavaImporter(org.openqa.selenium); //WebDriver classes
var support_ui = JavaImporter(; //WebDriver classes
var wait = new support_ui.WebDriverWait(WDS.browser, 10000);
var conditions =;

WDS.sampleResult.sampleStart(); //captures sampler's start time
WDS.sampleResult.getLatency();"Sample started");

wait.until(conditions.elementToBeClickable(pkg.By.xpath("//a[@href='x']")));"Sample ended - navigated to somethingsomething");


Related Questions