I'm currently attempting to locate an element using xpath and extract its text value.
As an example, I can find the element using xpath using the following method:
driver.findElement(webdriver.By.xpath("//div/span));
However, I am interested in retrieving the text of this specific element using JavaScript.
The HTML content is as follows:
<div><span>Inner Text</span></div>