I am trying to write e2e tests for a Slack bot and while logging in via browser it always asks whether I'd like to use the Slack desktop app instead of continuing with the browser (its Chrome by the way). Steps the Selenium webdriver is performing:
https://company-name.slack.com
email
and password
Sign In
buttonThis is not a normal browser alert but I'd like to get rid of it. I have tried the following:
webdriver.switch_to.alert.dismiss()
Does not dismiss this pop-upchrome_options.add_argument('--disable-default-apps')
switch also doesn't prevent the pop-up from showingThis also has to work on CI servers so please if the solution didn't involve modifying developer machine then that would be wonderful.
Well, this is not an answer but a workaround. I managed to get around the default-app
pop-up by continuing my operations in a new tab (But not before checking whether there is a pop-up in the first place). Psuedo code:
try
find_element_by_whatever(element_you_expect_after_login)
catch TimeoutException
webdriver.execute_script('window.open()')
webdriver.switch_to.window(webdriver.window_handles[1])
webdriver.get(url_which_required_login_in_the_first_place)