gasabr / bls-notifications

Bot to send notifications about open slots in bls visa center
5 stars 2 forks source link

"DeprecationWarning" error appears #1

Open direcliberty opened 1 year ago

direcliberty commented 1 year ago

Hello! Thank you for your code, but I get this error when I run it DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg with webdriver.Remote(f"{args.selenium_url}/wd/hub",l last): can you suggest how to fix it?

gasabr commented 1 year ago

To get read of this, you would have to create selenium client the new way, meaning instead of this line https://github.com/gasabr/bls-notifications/blob/7fba25a173c11526c719e26217e09ec21d63b12d/main.py#L100 you would have to use ChromeOptions like here (this is not python, but the api is similar) https://support.smartbear.com/crossbrowsertesting/docs/automated-testing/frameworks/selenium/about/use-of-desiredcapabilities-has-been-deprecated.html.

PR would be appreciated, I just forgot to fix it:)