javascript - Selenium webdriver doesn't click on save button in chrome and firefox -


my project in mvc , want test using selenium web driver. button clicks work properly. when navigate different page saying continue on page save button doesn't work.

below code

        driver.findelement(by.id("btnaddnew")).click();          iwebelement cat = driver.findelement(by.id("cat"));         cat.sendkeys("single-family house");          iwebelement ext_id = driver.findelement(by.id("externalid"));         ext_id.sendkeys("sar_47");          iwebelement zip = driver.findelement(by.id("addressziptown"));         zip.sendkeys("1205 genève");          iwebelement street = driver.findelement(by.id("addressstreet"));         street.sendkeys("tramstrasse 10");          driver.findelement(by.id("btncontinue")).click();          driver.findelement(by.id("btnsave")).click();          driver.quit(); 

can solve problem?

you can solve problem checking dom amount of time try find webelement. can use implicit or explicit waits.

doc:

http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-waits http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#implicit-waits


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -