I'm trying to write this code using Selenium and Python to skip to next windows of browser:
browser.switch_to_window_handles(browser.window_handles[-1])
But I don't understand why this error occured, please help me
error: AttributeError: 'WebDriver' object has no attribute 'switch_to_window_handles'
Try this:
browser.switch_to.window(browser.window_handles[-1])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With