Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'WebDriver' object has no attribute 'switch_to_alert' #62

Open
decodar opened this issue Jan 5, 2021 · 17 comments
Open

'WebDriver' object has no attribute 'switch_to_alert' #62

decodar opened this issue Jan 5, 2021 · 17 comments

Comments

@decodar
Copy link

decodar commented Jan 5, 2021

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

@jpreed00
Copy link

jpreed00 commented Oct 14, 2021

I'm seeing this error too. Did you ever find any resolution or figure out the cause?

@questjay
Copy link

me too

@questjay
Copy link

'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..

@decodar
Copy link
Author

decodar commented Oct 17, 2021 via email

@transcental
Copy link
Contributor

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!

@herlandio
Copy link

it's work

@rpgraham
Copy link

rpgraham commented Nov 4, 2021

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?

@questjay
Copy link

questjay commented Nov 4, 2021

@rpgraham just pip uninstall selenium to uninstall then pip install selenium==3.141.0 remember you have to uninstall to undergrade.

@rpgraham
Copy link

rpgraham commented Nov 4, 2021

Thanks so much! That took care of it.

@transcental
Copy link
Contributor

Solved in #80 !

Installing webbot again should fix everything!

@Pallav2905-py
Copy link

Thanks, it worked for me <3

@rpgraham just pip uninstall selenium to uninstall then pip install selenium==3.141.0 remember you have to uninstall to undergrade.

@Leberworschd
Copy link

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.

yevhen-kalyna added a commit to yevhen-kalyna/webbot that referenced this issue Jan 31, 2022
Add selenium 3.141.0 as a requirement for the built package
@pedrobritobr
Copy link

@rpgraham just pip uninstall selenium to uninstall then pip install selenium==3.141.0 remember you have to uninstall to undergrade.

Works for me, thanks!

@Ezema
Copy link

Ezema commented Apr 22, 2022

@rpgraham just pip uninstall selenium to uninstall then pip install selenium==3.141.0 remember you have to uninstall to undergrade.

Thanks!!

@lulucandy-us
Copy link

lulucandy-us commented May 10, 2022

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

@Raksh710
Copy link

Raksh710 commented Jun 6, 2022

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()

@ghost
Copy link

ghost commented Jun 8, 2022

@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

Levalicious added a commit to Levalicious/webbot that referenced this issue Apr 24, 2023
Fix nateshmbhat#62 object has no attribute 'switch_to_alert'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests