AboveTustin icon indicating copy to clipboard operation
AboveTustin copied to clipboard

Screenshot can fail when there are lots of aircraft

Open wiseman opened this issue 7 years ago • 0 comments

It looks like screenshot.clickOnAirplane can fail if there are so many aircraft in the list that the one it's trying to click on has scrolled below the visible portion of the window. The error is

selenium.common.exceptions.ElementNotVisibleException: Message: {"errorMessage":"Element is not currently visible and may not be manipulated", ...}

This stackoverflow post has an idea for a workaround, which is to run javascript in the headless browser that causes the click to occur whether the element is visible or not:

JavascriptExecutor jsx = (JavascriptExecutor)driver;
jsx.executeScript("arguments[0].click();", element);

wiseman avatar Nov 22 '17 18:11 wiseman