The release notes for ChromeDriver 2.33 says that ""Fixes a bug which caused Resizing/Positioning Window commands to fail on Chrome 62+" however this still seems to be an issue when i am using Chrome 62+ browser. Maximizing chrome window using chrome driver results in below exception. Does anyone know a solution please?
Another thing i noticed is, though i installed latest chromedriver (v2.33) from https://chromedriver.storage.googleapis.com/index.html?path=2.33/, the log printed below says Driver info: chromedriver=2.25.426923 !!
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html (Session info: chrome=62.0.3202.62) (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
There are exactly 2 issues.
As you mentioned, you have installed latest chromedriver (v2.33) but the log printed below says Driver info: chromedriver=2.25.426923, this issue must be addressed first. You can consider to manually kill all the dangling
chromedriver.exe
tasks from theTask Manager
. Additionally you can consider to useCCleaner
to wipe out all the rotten OS stuffs from your system. Take a system reboot if required. Finally ensure that what ever the absolute location ofchromedriver.exe
you are using withinSystem.setProperty()
ensure that the chromedriver binary is of version 2.33.Finally, it is suggested to use
ChromeOptions
class tomaximize
the Web Browser as follows:For the error
cannot get automation extension from unknown error
you can also refer to this QA/Discussion.I believe there were some old chrome driver processes running in backend and same were being picked up when it was invoked via code. I deleted all processes instances, deleted old version of chrome driver, added the new 2.33 version and it worked. Thanks all for your suggestions.
Use class ChromeOptions.
I think the reason behind it may be your chrome version. Try again with updating your chrome browser. I have faced this type of issues for compatibility between chrome browser & the driver