这里是我点击这个网站上简单登录按钮的代码。
我遇到了以下错误:
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Reports {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("https://platform.drawbrid.ge");
driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
driver.findElement(By.xpath(".//*[@id='_loginButton']")).click();
}
}
我遇到了以下错误:
异常情况: "main"线程中发生了org.openqa.selenium.ElementNotVisibleException异常:当前元素不可见,无法进行交互 命令执行持续时间或超时时间为:2.05秒