java - autosuggestion is not working in selenium -
i trying automate localities auto suggestion in below url:
https://qa.roofandfloor.com/
i wrote below code, not working:
webelement toelement = driver.driver.findelement(by.xpath(".//*[@id='s2id_autogen1']")); toelement.sendkeys("ye"); toelement.sendkeys(keys.return);
also, need test 5 entries, how in optimised way?
the page of asynchronous nature.
this means need explicitly wait elements become present, visible, clickable etc.
here example code wait input id="s2id_autogen1"
visible:
webdriverwait wait = new webdriverwait(webdriver, timeoutinseconds); webelement localities = wait.until(expectedconditions.visibilityofelementlocated(by.id("s2id_autogen1"))); localities.sendkeys("ye"); localities.sendkeys(keys.return);
Comments
Post a Comment