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
What are the different Selenium components?
How to find more than one web element in the list?
What is the purpose of creating a reference variable- 'driver' of type webdriver instead of directly creating a firefoxdriver object or any other driver's reference in the statement webdriver driver = new firefoxdriver();?
Tell us what kinds of test types are supported by selenium?
How to pause a test execution for 5 seconds at a specific point?
How to debug the tests in selenium ide?
What is a relative xpath?
What is listeners in selenium webdriver?
What you say in regards to the flexibility of selenium test suite?
What is selenium 3.0?
Tell me could cookies be deleted in selenium?
How to insert a start point in selenium ide?
How do perform drag and drop using webdriver?
How you can use “submit” a form using selenium?
How to scroll web page down or up using selenium webdriver?