Python version: 3.7.1
Chrome Version: Latest (79.0.3945.79)
It takes 4 seconds to switch tabs with "switch_to.window" command: (in both head mode and headless mode)
browser.switch_to.window(browser.window_handles[-1])
It does not have any effects when I try to switch windows with send keys:
browser.find_element_by_tag_name('body').send_keys(Keys.CONTROL + '2')
or
actions = ActionChains(browser)
actions.key_down(Keys.CONTROL).send_keys('2').key_up(Keys.CONTROL).perform()
There are only 10-20 tabs. It surprises me that it takes 4 seconds to switch tabs
How can I speed up the process?