Cannot find a file named webdriver.json' or an embedded resource with the id 'WebDriver.FirefoxPreferences Cannot find a file named webdriver.json' or an embedded resource with the id 'WebDriver.FirefoxPreferences selenium selenium

Cannot find a file named webdriver.json' or an embedded resource with the id 'WebDriver.FirefoxPreferences


When you build your project, the Selenium web driver binary should be copied to the output directory of your test project (e.g. /bin/Debug/netcoreapp2.0/). Try passing in the relative path to this binary to the XDriver constructor:

IWebDriver driver;switch (browser.ToLower()){    case "firefox":       driver = new FirefoxDriver("./");    break;    case "chrome":       driver = new ChromeDriver("./");    break;    case "ie":    case "internetexplorer":       driver = new InternetExplorerDriver("./");    break;    case "phantomjs":       driver = new PhantomJSDriver("./");    break;    default:        driver = new PhantomJSDriver("./");    break;   }