Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法单击按钮org.openqa.selenium.WebDriverException:</按钮>;在点(502,85)处不可单击。其他元素将收到单击:_Java_Selenium_Selenium Webdriver_Webdriver_Selenium Chromedriver - Fatal编程技术网

Java 无法单击按钮org.openqa.selenium.WebDriverException:</按钮>;在点(502,85)处不可单击。其他元素将收到单击:

Java 无法单击按钮org.openqa.selenium.WebDriverException:</按钮>;在点(502,85)处不可单击。其他元素将收到单击:,java,selenium,selenium-webdriver,webdriver,selenium-chromedriver,Java,Selenium,Selenium Webdriver,Webdriver,Selenium Chromedriver,我正在使用AngularJS应用程序。并且使用selenium和Java进行匹配。每当我尝试单击按钮时,就会得到异常作为 Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Element <button .</button> is not clickable at point (502, 85). Other element would receive the c

我正在使用AngularJS应用程序。并且使用selenium和Java进行匹配。每当我尝试单击按钮时,就会得到异常作为

 Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Element <button .</button> is not clickable at point (502, 85). Other element would receive the click: <div class="col-sm-12 move-buttons">...</div>
我还尝试了正常定位元素并点击它。 这也会产生同样的错误


所以最终我无法点击此按钮

您是否尝试过使用Action类-

WebElement element = driver.findElement(By("element"));
Actions action = new Actions(driver);
action.moveToElement(element).click().perform();


谢谢你的回复。代码使用.js.executeScript(“window.scrollBy(1000,document.body.scrollHeight)”)下面的代码片段为我工作;driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);WebElement addXYZ=driver.findElement(By.xpath(“//i[@class='fa+fa-2x']);JavascriptExecutor jse2=(JavascriptExecutor)驱动程序;jse2.executeScript(“参数[0].ScrollingToView()”,addXYZ);
WebElement element= driver.findElement(By.xpath("//div[contains(@class,'col-sm-1')]//button[1]"));

js.executeScript("arguments[0].scrollIntoView(true);",element);
js.executeScript("arguments[0].click();", element); 
WebElement element = driver.findElement(By("element"));
Actions action = new Actions(driver);
action.moveToElement(element).click().perform();
WebElement elementToClick = driver.findElement(By.xpath("Your xpath"));((JavascriptExecutor)driver).executeScript("window.scrollTo("+elementToClick.getLocation().x+","+elementToClick.getLocation().y+")"); elementToClick.click();
WebDriverWait wait = new WebDriverWait(driver, TIME_IN_SECONDS);
wait.until(ExpectedConditions.elementToBeClickable(By.className("element-class-name")));