selenium webdriver - OneTimeSetUp: System.ArgumentException on setting-up Gecko driver 0.16 -


getting following exception on setting gecko driver in c# on mac machine

onetimesetup: system.argumentexception : there option marionette capability. please use instead. parameter name: capabilityname

selenium webdriver version: 3.4.0 gecko driver version: 0.16 firefox version : 54.0.1

string browsername = configurationmanager.appsettings["browser"];

        desiredcapabilities capabilities = new desiredcapabilities();         capabilities.setcapability(capabilitytype.acceptsslcertificates, true);         capabilities.setcapability(capabilitytype.supportsapplicationcache, true);         capabilities.setcapability(capabilitytype.handlesalerts, true);         capabilities.setcapability(capabilitytype.isjavascriptenabled, true);         capabilities.setcapability("marionette", true);        system.environment.setenvironmentvariable("webdriver.gecko.driver", "/users/matsbacklund/documents/sarabjeet/geckodriver");         if (browsername.contains("firefox"))         {             //firefoxdriverservice service = firefoxdriverservice.createdefaultservice();             //service.firefoxbinarypath = "/users/matsbacklund/library/application support/firefox/profiles/tfhoaxjl.default";             firefoxoptions options = new firefoxoptions();             options.browserexecutablelocation="/users/matsbacklund/library/application support/firefox/profiles/tfhoaxjl.default";             options.uselegacyimplementation = false;             capabilities.setcapability("moz:firefoxoptions", options);             driver = new firefoxdriver(capabilities);         }         else if (browsername.contains("ie") || browsername.contains("internetexplorer"))         {         }         else if (browsername.contains("chrome"))         {         }         else if (browsername.contains("safari"))         {         }          driver.manage()             .timeouts()             .implicitlywait(timespan.fromseconds(double.parse(configurationmanager.appsettings["maxwaittimetopollelement"])));         driver.manage().cookies.deleteallcookies();         driver.navigate().gotourl(configurationmanager.appsettings["applicationurl"]);         driver.manage().window.maximize();         return driver; 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -