Skip to content

Instantly share code, notes, and snippets.

@muditlambda
Created October 23, 2019 14:38
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/c8c515df3b3a09435a64f83f11c7c524 to your computer and use it in GitHub Desktop.
Save muditlambda/c8c515df3b3a09435a64f83f11c7c524 to your computer and use it in GitHub Desktop.
WebElement txt_label = driver.findElement(By.cssSelector("label[id='uname']"));
WebElement txt_label = driver.findElement(withTagName("input").toRightOf(txt_label));
String txt_name = driver.findElement(withTagName("input").toLeftOf(By.id("some_button"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment