Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we get text from a Web Part?

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


Please Help Members By Posting Answers For Below Questions

How to perform right click action (context click) in selenium webdriver?

821


What are the advantages of selenium webdriver?

924


How to achieve database testing in selenium?

919


Tell me what is a hub in selenium grid?

867


Write the code to double click an element in selenium?

797


What if you have written your own element locator and how would you test it?

1007


What is selenium? What are the different selenium components?

845


Explain how you can insert a break point in selenium ide?

847


What are driver.close and driver.quit in WebDriver? Which is more preferable?

855


Why do you need session handling while working with selenium?

856


How does one submit a form in selenium?

947


What is the super interface of webdriver?

1003


Is there an htmlunitdriver for .net?

927


How to check if a button is enabled on the page?

852


How to handle browser (chrome) notifications in selenium?

944