A
A
agent_22032021-12-10 06:50:37
selenium
agent_2203, 2021-12-10 06:50:37

How to press and hold a button?

How can you simulate a long press of a button, for example, so that there is a loading animation when you click on an element?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
ab1, 2021-12-20
@agent_2203

Google
ActionChains(driver).click_and_hold(element)

V
Vindicar, 2021-12-10
@Vindicar

Mouse button?
Send a mouse down event, wait how long to hold, send a mouse up.
I don’t remember the exact methods, you need to rummage through the selenium documentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question