Monday, 17 February 2014

Button Click In Selenium Webdriver

1.if button type is

Html Code : <button type="submit"> Login </button>
path: driver.findElement(By.xpath("//button[@type='submit']")).click();

2.if button type is

Html Code : <input type="submit" value="SUBMIT" name="action"></input>
path:  driver.findElement(By.cssSelector("input[type='submit']")).click();

No comments:

Post a Comment

Angular JS Protractor Installation process - Tutorial Part 1

                     Protractor, formally known as E2E testing framework, is an open source functional automation framework designed spe...