D
D
Denis99992015-12-26 23:22:31
Python
Denis9999, 2015-12-26 23:22:31

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

2 answer(s)
E
Evgeniy _, 2015-12-28
@Denis9999

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()

A
abs0lut, 2015-12-27
@abs0lut

Something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question