Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97811

Slow in switching tabs with Python 3 selenium in Chrome 79

$
0
0

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?


Viewing all articles
Browse latest Browse all 97811

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>