1
我試圖在Firefox中啓動Gmail應用程序,並且我嘗試了Chrome。但是在運行此應用程序時出現錯誤。不知道這個錯誤。而這個錯誤似乎更特定於Java。任何人都可以幫我解決這個問題嗎?請找項目結構和下面的錯誤消息,在使用Selenium啓動瀏覽器時的問題Java
public static void main(String[] args) {
//Opening the browser
WebDriver driver = new FirefoxDriver();
//Navigating to this url
driver.get("https://www.gmail.com");
//Maximizing the browser window
driver.manage().window().maximize();
//Closing the browser
driver.close();
}
試試這裏的答案http://stackoverflow.com/questions/5134953/noclassdeffounderror-in-java-com-google-common-base-function,最有可能的類路徑問題 –
謝謝納文。其實,我錯過了在硒項目中添加所有庫(我只添加了Selenium 2.53和Selenium 2.53 srcs JAR) – Aishu