khan07
khan07

Reputation: 71

How to get value through javascript using selenium webdriver?

Is there a way to get the element value from browser to web driver. i.e. whenever I click on browser it should send value of that element to selenium web driver.

Upvotes: 0

Views: 1930

Answers (1)

Pooja
Pooja

Reputation: 136

If you are trying to get some value from browser, you can use

String str = Driver.findElement(By.xpath("xpath of the object").getText();

Upvotes: 3

Related Questions