0

I was trying to do a simple tester script because I wanted to get into it, but when I ran my first script, this happened. I tried installing gecko, but I have no idea how to install it, and all the tutorials didn't work for me. Any help would be much appreciated!

Using visual studio and c#

Error message

kiner_shah
  • 3,939
  • 7
  • 23
  • 37
Eden Gibson
  • 126
  • 1
  • 11
  • Here is a relevant solution that maybe you can refer to. [https://stackoverflow.com/a/39426778/8335151](https://stackoverflow.com/a/39426778/8335151) – 大陸北方網友 Aug 12 '20 at 01:06

1 Answers1

0

If you want to open firefox driver you need to set gecko driver by path.

    //Give the path of the geckodriver.exe    
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService(@"C:\Users\abcd\Downloads\geckodriver-v0.13.0-win64","geckodriver.exe")

//Give the path of the Firefox Browser        
service.FirefoxBinaryPath = @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe";

IWebDriver driver = new FirefoxDriver(service);
driver.Navigate().GoToUrl("https://www.google.com");

new release https://github.com/mozilla/geckodriver/releases

Justin Lambert
  • 940
  • 1
  • 7
  • 13