当我给出driver.manage()。timeouts()。implicitlyWait(10,TimeUnit.SECONDS);在我的脚本中,我收到错误消息'键入'参数。在这里我注意到,当我在Firefox(在脚本中)设置配置文件时,我得到此错误,但没有在脚本中设置配置文件相同的命令工作正常。 硒版3.8.1 geckodriver:0.19.1 Firefox:58.0.1 脚本中的代码如下:
<MainLayout
screens={Status === types.SELECT_LIST_SUCCESS ? renderListPage : <Spin />}
/>
日志:
public static WebDriver driver;
public static void main(String[] args) {
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"C:\\Users\\Veenu Gilotra\\Documents\\Selenium\\log.txt");
//set profile for selenium
ProfilesIni allprof = new ProfilesIni();
FirefoxProfile prof = allprof.getProfile("TestUser");
prof.setAcceptUntrustedCertificates(true);
prof.setAssumeUntrustedCertificateIssuer(false);
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setProfile(prof);
System.setProperty("webdriver.geckoderiver", "C:\\tmp\\Browser_driver\\geckodriver.exe");
driver = new FirefoxDriver(firefoxOptions);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.get("https://www.facebook.com");