Typeerror: 'nonetype' Object Is Not Subscriptable While Invoking Execute_script() For Chrome Download Manager Through Selenium
I have been using this function https://stackoverflow.com/a/48267887/11220889 for waiting for downloads to finish and returning the file path once finished. And it has been working
Solution 1:
As per the error message:
TypeError: 'NoneType'objectisnot subscriptable
Your main issue seems to be incompatibility between the version of the binaries you are using as follows:
- You are using chromedriver=2.43
- Release Notes of chromedriver=2.43 clearly mentions the following :
Supports Chrome v69-71
- You are using chrome=73.0
- Release Notes of ChromeDriver v2.46 clearly mentions the following :
Supports Chrome v71-73
So there is a clear mismatch between ChromeDriver v2.43 and the Chrome Browser v73.0
Solution
- Upgrade ChromeDriver to current ChromeDriver v2.46 level.
- Keep Chrome version at Chrome v73 level. (as per ChromeDriver v2.46 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
- Execute your
@Test
. - Always invoke
driver.quit()
withintearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.
Update
Currently GAed Chrome v73 have some issues and you may like to downgrade to Chrome v72. You can find a couple of relevant discussions in:
Post a Comment for "Typeerror: 'nonetype' Object Is Not Subscriptable While Invoking Execute_script() For Chrome Download Manager Through Selenium"