我尝试在笔记本电脑中运行此代码。我按照youtube中Edureka的所有指示进行了操作。尝试卸载并重新安装方法。我从代码工作的笔记本电脑传输文件但仍然没有用。
package testing;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import net.bytebuddy.asm.Advice.Enter;
public class test_1 {
WebDriver driver;
public void invokeBrowser() {
try {
System.setProperty("webdriver.chrome.driver", "D:\\Program Files (x86)\\Files\\chromedriver.exe");
driver = new ChromeDriver();
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
driver.get("http://google.com/");
LogIn();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
test_1 myObj = new test_1();
myObj.invokeBrowser();
}
}
然后这是错误
Exception in thread "main"
org.apache.bcel.verifier.exc.AssertionViolatedException:
FOUND:
INTERNAL ERROR: Oops!
Exiting!!
at
org.apache.bcel.verifier.exc.AssertionViolatedException.main(AssertionViolatedException.java:102)