为了账号安全,请及时绑定邮箱和手机立即绑定

31.0版火狐,​现在firebug组件不存在了,运行代码报错

package com.mypro1.jase;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.*;

public class baidu {

public static void main(String[] args) { 

    System.out.println("srart selenium");

    WebDriver driver = new FirefoxDriver();

    driver.get("
http://www.baidu.com/
");

    WebElement txtbox=driver.findElement(By.id("kw"));

    txtbox.sendKeys("selenium java");

    WebElement btn=driver.findElement(By.id("su"));

    btn.click();

    driver.close();

System.out.println("end selenium");

    }

}
报错提示:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function

 at com.mypro1.jase.baidu.main(baidu.java:9)

Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function

 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)

 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

 ... 1 more


正在回答

2 回答

这是MOOC的一般性规则。

umborzgmzdfa

0 回复 有任何疑惑可以回复我~
0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

31.0版火狐,​现在firebug组件不存在了,运行代码报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信