Reputation: 822
I continue to get an "element not interactable" error which I think is due to the link not being loaded fast enough after an action on the page. Implicit driver wait doesn't seem to be working, looks like it's not even setting?
I'm setting implicit wait for the driver like this: (Pageload doesn't seem to help)
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Capabilities [{mobileEmulationEnabled=false, timeouts={implicit=0, pageLoad=300000, script=30000}, hasTouchScreen=false, platform=XP, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:63891}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, setWindowRect=true, unexpectedAlertBehaviour=ignore, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387), userDataDir=C:\Users\jxg262\AppData\Local\Temp\scoped_dir2012_6758}, takesHeapSnapshot=true, unhandledPromptBehavior=ignore, pageLoadStrategy=normal, strictFileInteractability=false, databaseEnabled=false, handlesAlerts=true, version=71.0.3578.98, browserConnectionEnabled=false, proxy=Proxy(), nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
This seems to show that implicits are not being set. Am I doing something wrong? Is there a way to set this elsewhere?
Upvotes: 2
Views: 2015
Reputation: 21
Implicit timeout is chrome server timeout so try setting it before starting Chrome, like this
ChromeOptions chromeOptions = new ChromeOptions();
Map<String, Integer> timeouts = new HashMap<>();
timeouts.put("implicit", 3000);
chromeOptions.setCapability("timeouts", timeouts);
webDriver = new ChromeDriver(chromeOptions);
Upvotes: 1