A
A
agent_22032020-11-23 15:02:32
Python
agent_2203, 2020-11-23 15:02:32

How to make simultaneous keypress in selenium python?

In short, you need to call the Responsive Design Mode from selenium , I wanted to use the option of holding hot keys, that is, ctrl+shift+m ​​, I use the following code:

ActionChains(self.driver)   \
            .key_down(Keys.CONTROL) \
            .key_down(Keys.SHIFT)   \
            .send_keys("m")         \
            .key_up(Keys.CONTROL)   \
            .key_up(Keys.SHIFT)   \
        .perform()


The code runs without errors, but nothing happens, what's the problem? Or is there another way to call this mode from under selenium ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question