Created
October 23, 2019 14:57
-
-
Save muditlambda/24c4ded1f68b48e62a7e92ff0e7e3bf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void test_login_using_relative_locators_3(){ | |
WebElement txt_name = driver.findElement(withTagName("input") | |
.toLeftOf(By.id("addbutton")) | |
.below(By.name("li5"))); | |
txt_name.sendKeys("Relative locators test"); | |
// Get details of the Submit/Add button | |
WebElement submitbutton = driver.findElement(By.xpath("//*[@id=\'addbutton\']")); | |
// Submit the new entry | |
submitbutton.click(); | |
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment