geckodriver.exe not in current directory or path variable, Selenium 2.53.1 + Firefox 48 + Selenium 3 Beta

后端 未结 11 967
心在旅途
心在旅途 2020-12-29 22:43

Seen a lot of questions regarding Selenium 2.53.1 and Firefox 47.0.1, but none in regards to the Selenium 3 Beta release. I am attempting to use the new gecko/marionette Fir

11条回答
  •  有刺的猬
    2020-12-29 23:13

    This solution may helps you fix problem: ( It did help me though)

    public class TestResult {
    
        private IWebDriver driver;
        private StringBuilder verificationErrors;
        private string baseURL;
        private bool acceptNextAlert = true;
    
        [TestInitialize]
        public void SetupTest() {
            FirefoxDriverService service = FirefoxDriverService.CreateDefaultService(@"C:\geckodriver", "geckodriver.exe");
            service.Port = 64444;
            service.FirefoxBinaryPath = @"C:\Program Files (x86)\Firefox Developer Edition\firefox.exe";
            driver = new FirefoxDriver(service);
            baseURL = "http://localhost:49539";
            verificationErrors = new StringBuilder();
        }
    }
    
    REFERENCE
    • Check out @juver-malpartida 's Answer

提交回复
热议问题