Exception in thread "main" org.openqa.selenium.interactions.MoveTargetOutOfBoundsException

276 views
Skip to first unread message

ama...@bufetedemarketing.com

unread,
May 19, 2017, 7:21:11 AM5/19/17
to Selenium Users
Heeelllooo!!! I'm here again... (unfortunately...)

I've trying to get data from a graphic like this: https://www.highcharts.com/demo/line-basic

I've noticed two problematic things:

  1. Different dots in the same line have the same xpath!!!!! (How could I get every dot then???)
  2. I've tried to get data of that xpath and I get the following error: Exception in thread "main" org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: (863.9166717529297, 1180.5499649047852) is out of bounds of viewport width (1280) and height (913)
What is happening here? (I'm pretty new here and I've never seen that error exception)

I show you my graphic:


My code is:

WebElement element = driver.findElement(By.xpath(".//*[@id='highcharts-10']/*[name()='svg']/*[name()='g'][5]/*[name()='g'][4]/*[name()='path'][11]"));
// action class click
Actions action = new Actions(driver);
action.click(element).build().perform();

Thread.sleep(20000);
 
WebElement toolTipElement = driver.findElement(By.xpath(".//*[@id='highcharts-10']/div[1]/span")); //xpath shown tooltip
System.out.println(toolTipElement.getText());
 
Any ideas to solve it?

Thanks soooo much guys!!!


P.D. (This is the never-ending-story definitely)

ama...@bufetedemarketing.com

unread,
May 19, 2017, 7:49:56 AM5/19/17
to Selenium Users
I've tried to give some time to load the data but it doesn't return the info inside the tooltips of the dots in line. I show you how it locates the dot:

And what it returns:


It returns empty the tooltip (this is the most important)... and then causes an error exception (maybe it needs more time to load?)

Why is happening this? I though that it would be the same as the other type of highcharts... 

Thanks so much guys... and sorry because of the inconveniences... 

ama...@bufetedemarketing.com

unread,
May 19, 2017, 7:59:31 AM5/19/17
to Selenium Users
Well,,,

Now I get a data, but of one dot, not the rest of the dots of the line... how could I locate them if they have the same xpath (as I indicated in the first post of this thread)?

I show you the (incomplete) result:



Any ideas to get data of the rest of the dots???

Thanks so much guys!!!
Reply all
Reply to author
Forward
0 new messages