Answer Posted / uma rani
We can use getText() pre-defined method. It helps to retrieve the text of a specific web element.
String text = driver.findElement(By.id("xxxx")).getText();
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to perform right click action (context click) in selenium webdriver?
What are the advantages of selenium webdriver?
How to achieve database testing in selenium?
Tell me what is a hub in selenium grid?
Write the code to double click an element in selenium?
What if you have written your own element locator and how would you test it?
What is selenium? What are the different selenium components?
Explain how you can insert a break point in selenium ide?
What are driver.close and driver.quit in WebDriver? Which is more preferable?
Why do you need session handling while working with selenium?
How does one submit a form in selenium?
What is the super interface of webdriver?
Is there an htmlunitdriver for .net?
How to check if a button is enabled on the page?
How to handle browser (chrome) notifications in selenium?