Skip to content

Instantly share code, notes, and snippets.

@muditlambda
Created October 23, 2019 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muditlambda/0ea2398adebe307b35f9878e2987783a to your computer and use it in GitHub Desktop.
Save muditlambda/0ea2398adebe307b35f9878e2987783a to your computer and use it in GitHub Desktop.
@Test
public void test_login_using_relative_locators_1(){
String name = driver.findElement(withTagName("input")
.above(By.name("li5"))
.below(By.name("li3")))
.getAttribute("name");
assertEquals(name, "li4");
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