selenium - Is there any command for page to load completely in Jmeter Webdriver -


var pkg = javaimporter(org.openqa.selenium) var support_ui = javaimporter(org.openqa.selenium.support.ui.webdriverwait) var wait = new support_ui.webdriverwait(wds.browser, 5000) var url = wds.args[0]; var user = wds.args[1]; var pwd = wds.args[2];  wds.sampleresult.samplestart() wds.browser.get(url) var wait=new support_ui.webdriverwait(wds.browser,15000) var username = wds.browser.findelement(pkg.by.id('login_txtusername')).sendkeys([user]) //username.click() //username.sendkeys(['pandian']) var userpwd = wds.browser.findelement(pkg.by.id('login_txtpassword')).sendkeys([pwd]) //userpwd.click() //userpwd.sendkeys(['1234']) var button = wds.browser.findelement(pkg.by.id('login_btnlogin')).click() 

if execute above code it's working fine, happen when browser open page not loading it's navigating element, want page load completely, "is there command available jmeter" bcoz command in jmeter differs selenium webdriver.... please provide command

yes, can add "wait element" webdriver command wait until element viewable / clickable etc. using wait.until command.

here example:

var pkg = javaimporter(org.openqa.selenium, org.openqa.selenium.support.ui) var wait = new pkg.webdriverwait(wds.browser, 5000)  wds.sampleresult.samplestart()  wds.browser.get("http://www.somesite.com/browse/product.php?pid=12345"); wds.browser.findelement(pkg.by.id("addtobagbtn")).click();  wait.until(pkg.expectedconditions.elementtobeclickable(pkg.by.id('inlinebagcheckout2')))  wds.sampleresult.sampleend() 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -