我想要使用網絡自動化硒,但我有NoClassDefFoundError錯誤。我的Buildpath似乎正確,但我有一個NoClassDefFoundError的
我有我引用的庫和我的代碼運行斜面硒 - Java的2.52.jar。
這裏是我的代碼示例:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Tipo_helo_World {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.com.br/?gws_rd=ssl");
driver.findElement(By.id("gs_htif0")).sendKeys("Interfile");
driver.findElement(By.xpath("//input[@value='PesquisaGoogle']")).click();
}
}
謝謝你的幫助。 看一看我的工作文件夾,他們已經擁有了硒的Java庫。 [鏈接到Eclipse圖像](http://imgur.com/XZnGDdN) [鏈接到工作場所圖像](http://imgur.com/9dKNZ4e) [鏈接到利布斯圖像](HTTP:// imgur。 com/5h915oK) – Feradg