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
Tell me can selenium handle windows based pop-up?
What are the ways to refresh a browser using selenium webdriver?
How to check if a text is highlighted on the page ?
Tell me what you know about selenium?
Tell me how you can capture server side log selenium server?
Is it possible to automate the captcha using selenium?
How to enter text in the HTML text box without invoking the SendKeys ()?
Tell me why to choose python over java in selenium?
What are some disadvantages of Selenium automation?
Explain in selenium ide how can you debug the tests?
How can you fetch an attribute from an element? How to retrieve typed text from a textbox?
How to run selenium webdriver test from the command line?
How can I learn to automate testing using selenium?
What are the limitations of using selenium as a test tool?
Please explain what are the different types of locators in selenium?