I am trying to find an element using xpath and get the elements text value.
For example, I can find the element using xpath in the following way
driver.findElement(webdriver.By.xpath("//div/span));
But I want to get the text of this particular element by using JavaScript.
HTML content is like below
<div><span>Inner Text</span></div>