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 change the url on a webpage using selenium web driver?
In which format does source view shows your script in selenium ide?
We do create a reference variable ‘driver’ of type webdriver
Do you know how to locate a link using its text in selenium?
Explain how you can use recovery scenario with selenium?
What are core extension?
How can we find the value of different attributes like name, class, value of an element?
What is parameterization in testng?
When do you use selenium grid?
What are the testing type supported by selenium webdriver?
Explain the difference between confirming and verifying commands?
What are the different ways in which selenium ide can be opened?
What are the types of assertions there in selenium?
Write a code to wait for a particular element to be visible on a page. Write a code to wait for an alert to appear.
What are some commonly encountered exceptions in selenium?