I have a problem with locating an element in a span tags.
It takes part of a tooltip that appears when I put my mouse on it.
I'll show you in the following image: https://i.stack.imgur.com/b1qTg.jpg data from tooltip
When I put my mouse on that dot, the tooltip appears. I need to get that data to verify the text of the web page in Selenium Webdriver.
I've tried this code with xpath, but it doesn't return any data:
//dot of the highchart where I put my mouse to see the tooltip. Selenium Webdriver doesn't find it and it causes an error, it stops the execution here
WebElement element = driver.findElement(By.xpath(".//*[@id='highcharts-4']/svg/g[5]/g[2]/path[5]")); //dot's xpath
// Use action class to mouse hover on the dot
Actions action = new Actions(driver);
action.moveToElement(element).build().perform();
WebElement toolTipElement = driver.findElement(By.xpath(".//*[@id='highcharts-4']/div[1]/span")); //xpath of the shown tooltip
// To get the tool tip text
String toolTipText = toolTipElement.getText();
Any ideas to can get that data inside ?? Thanks so much for your help!!!!!