Answer the question
In order to leave comments, you need to log in
How to hold down a key in Selenium WebDriver Python 3?
Actually, the question is in the title.
Answer the question
In order to leave comments, you need to log in
selenium-python.readthedocs.org/api.html#selenium....
key_down(value, element=None)
Sends a key press only, without releasing it.
Should only be used with modifier keys (Control, Alt and Shift).
Args:
value: The modifier key to send. Values are defined in Keys class.
element: The element to send keys. If None, sends a key to current focused element.
Example, pressing ctrl+c:
ActionChains(driver).key_down(Keys.CONTROL).send_keys('c').key_up(Keys.CONTROL).perform()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question