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 launch a browser using selenium webdriver?
What is the difference between implicit wait and explicit wait?
How can we check if an element is enabled for interaction on a web page?
How to pause a test execution for 5 seconds at a specific point?
What are some commonly encountered exceptions in selenium?
What is the difference between selenium and qtp?
What are some disadvantages of Selenium automation?
Do you know what are the main advantages of selenium grid?
How to handle dropdowns in selenium?
What are the two modes of views in selenium ide?
Explain me how many types of webdriver apis are available in selenium?
How can we create an object repository in selenium?
how can you retrive the message in an alert box?
How do perform drag and drop using webdriver?
Explain how you can handle frames using selenium 2.0?