webbot
webbot copied to clipboard
'WebDriver' object has no attribute 'switch_to_alert'
Hi Natesh - I've been using webbot to automate some browser tasks and recently moved my code to a new mac. I am getting an attribute error on the web=Browser() code - the Chrome window launches, but then nothing happens, and I get the attribute error. I think the problem is either with Chrome (so I reinstalled) or in the Selenium code you wrapped (saving me lots of reading and time - thank you!), but wanted to check with you to see if there was a simple solution.
Thanks!
Darrin
I'm seeing this error too. Did you ever find any resolution or figure out the cause?
me too
'switch_to_alert'
I'm seeing this error too. Did you ever find any resolution or figure out the cause?
webbot uses selenium on new version of selenium >= "4.0.0" doen't support 'switch_to_alert' and webbot is not upgraded to new selenium so the solution is to undergrade to selenium == "3.141.0" that will work..
No resolution - I converted to selenium.
On Oct 17, 2021, at 9:36 AM, Kwest J. Arcade @.***> wrote:
'switch_to_alert'
I'm seeing this error too. Did you ever find any resolution or figure out the cause?
webbot uses selenium on new version of selenium >= "4.0.0" doen't support 'switch_to_alert' and webbot is not upgraded to new selenium so the solution is to undergrade to selenium == "3.141.0" that will work..
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nateshmbhat/webbot/issues/62#issuecomment-945155578, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLVTV5EDAQ4ODUXHE3TNN3UHL3SXANCNFSM4VWPCL4Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
webbot uses selenium on new version of selenium >= "4.0.0" doen't support 'switch_to_alert' and webbot is not upgraded to new selenium so the solution is to undergrade to selenium == "3.141.0" that will work..
Thanks, that made it work for me!
it's work
I have the same issue with webbot and selenium 4.0.0 on a new Mac; but I don't know how to undergrade to selenium 3.141.0. Can you give me some tips?
@rpgraham just pip uninstall selenium
to uninstall then pip install selenium==3.141.0
remember you have to uninstall to undergrade.
Thanks so much! That took care of it.
Solved in #80 !
Installing webbot again should fix everything!
Thanks, it worked for me <3
@rpgraham just
pip uninstall selenium
to uninstall thenpip install selenium==3.141.0
remember you have to uninstall to undergrade.
Thanks a lot! I was already frustrated. This worked!!!
@rpgraham just pip uninstall selenium to uninstall then pip install selenium==3.141.0 remember you have to uninstall to undergrade.
@rpgraham just
pip uninstall selenium
to uninstall thenpip install selenium==3.141.0
remember you have to uninstall to undergrade.
Works for me, thanks!
@rpgraham just pip uninstall selenium to uninstall then pip install selenium==3.141.0 remember you have to uninstall to undergrade.
Thanks!!
I have the same problem. I followed the uninstall and install commands to undergrade the selenium to 3.141.0, however the error still there. the version of my webbot is 0.34. Any other thing need to take care? Does it also relevant to the chromedriver version? My Chrome and ChromeDriver version are 101
In the latest version of selenium (I downloaded it the day before yesterday i.e. June 4, 2022), you can try using this:
alert = driver.switch_to.alert
alert.accept()
@Raksh710 I am trying this code from webbot import Browser web = Browser() and when I added driver.switch_to.alert it says driver not found