Answers

Question and Answer:

  Home  Automation

⟩ Tell me how can the user get a text of a web element?

User can retrieve the text of the specified web element by using get command. It doesn’t require any parameter but returns a string value.

String Text = driver.findElement(By.id(“Some Text”)).getText()

is an example of it.

 140 views

More Questions for you: