WebDriver便携式Firefox c#
我试图加载便携式FirefoxWebDriver便携式Firefox c#,c#,selenium,selenium-webdriver,webdriver,C#,Selenium,Selenium Webdriver,Webdriver,我试图加载便携式Firefox FirefoxProfile profile = new FirefoxProfile(); var binary = new FirefoxBinary(Directory.GetCurrentDirectory()+ @"\FirefoxPortable64\FirefoxPortable.exe"); var driver = new FirefoxDriver(binary, profile); 但是我发现错误无法在var driver=newfire
FirefoxProfile profile = new FirefoxProfile();
var binary = new FirefoxBinary(Directory.GetCurrentDirectory()+ @"\FirefoxPortable64\FirefoxPortable.exe");
var driver = new FirefoxDriver(binary, profile);
但是我发现错误无法在var driver=newfirefoxdriver(二进制文件,概要文件)行中找到匹配的功能集代码>
你能帮我吗
行内var-driver=新的FirefoxDriver(二进制,配置文件)代码>我收到警告:
FirefoxDriver不应使用FirefoxBinary对象构造。改用FirefoxOptions。此构造函数将在将来的版本中删除
如何重写代码
UPD:
我重写代码:
FirefoxProfile profile = new FirefoxProfile();
FirefoxOptions options = new FirefoxOptions();
options.Profile = profile;
options.BrowserExecutableLocation = Directory.GetCurrentDirectory() + @"\FirefoxPortable64\FirefoxPortable.exe";
var driver = new FirefoxDriver( options);
但它不起作用,再次出现错误无法找到一组匹配的功能解决方案
options.BrowserExecutableLocation = Directory.GetCurrentDirectory() + @"\FirefoxPortable32\App\Firefox\firefox.exe";
虽然这在理论上可以回答这个问题,但最好添加代码的功能描述以及代码如何回答这个问题。