2016-11-23 5 views
1

저는 지난 몇 시간 동안이 문제에 어려움을 겪었습니다. Selenium 웹 드라이버를 설치하려고하고 있으며 테스트 페이지를 실행하지 못하게하는 많은 오류가 발생했습니다. 가장 최근의 문제는 다음 코드와 관련이 있습니다.드라이버 실행 파일이 존재하지 않습니다 : Selenium Firefox

두 번째 단계에 대한 의견을 보내 주시면 감사하겠습니다.

package automationFramework; 

import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.firefox.FirefoxDriver; 

public class FirstTestCase { 

    public static void main(String[] args) throws InterruptedException{ 
     System.setProperty("webdriver.gecko.driver","C:/Users/theone/Downloads/geckodriver 2.exe"); 

     // Create a new instance of the Firefox driver 
     WebDriver driver = new FirefoxDriver(); 

     //Launch the Online Store Website 
     driver.get("http://www.store.demoqa.com"); 

     // Print a Log In message to the screen 
     System.out.println("Successfully opened the website www.Store.Demoqa.com"); 

     //Wait for 5 Sec 
     Thread.sleep(5); 

     // Close the driver 
     driver.quit(); 
    } 
} 

답변

3
C:/Users/theone/Downloads/geckodriver 2.exe 

경로에 공간이, 그것은 수 있습니다 - 그것은 파이어 폭스, GeckoDriver 및 셀레늄 3.0

체크 아웃이 가지 방법을 모두 사용하여 설치를 제공하는이 문서의 사용자의 경우 최신 버전 좋은 것 파일의 이름을 바꾼다면 작동 geckodriver2.exe.

+0

감사합니다. 그것은 효과가있다! –

+1

@RanaHaram -이 답이 문제를 해결하는 데 성공했다면 정답으로 사용하십시오. – bakoyaro