using chrome 78 and chromedriver78 When i click an audio file or try to stop an audio using selenium tests i am getting this error.
Error:
org.openqa.selen
This error message...
Javascript error: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite
...implies that the WebDriver instance was unable to find the desired element using the Locator Strategy for one or the other reasons:
/
display: none;
The relevant HTML would have been helpful to analyze the issue in a better way. However, you need to take care of a couple of things as follows:
Ensure that the locator strategy identifies the desired element uniquely within the HTML DOM.
Induce WebDriverWait for the elementToBeClickable()
and you can use either of the following Locator Strategies:
cssSelector
:
new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.cssSelector("elementCssSelector"))).click();
xpath
:
new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath("elementXpath"))).click();
If the WebElement is within an /
you need to induce WebDriverWait for the desired
frameToBeAvailableAndSwitchToIt()
.
You can find a relevant detailed discussion in Is it possible to switch to an element in a frame without using driver.switchTo().frame(“frameName”) in Selenium Webdriver Java?
You can find a couple of relevant detailed discussions in: