splinter icon indicating copy to clipboard operation
splinter copied to clipboard

mouse actions long_click and right_long_click

Open thlengane opened this issue 5 years ago • 3 comments

How can I lock_click on an object? I can do double_click and right_click without any problem but I would like to long_click or right_long_click. Is there anything I can do to achieve this?

thlengane avatar Mar 09 '21 11:03 thlengane

There's currently no splinter method for this, but you can use ActionChains directly.

https://www.selenium.dev/selenium/docs/api/py/webdriver/selenium.webdriver.common.action_chains.html#selenium.webdriver.common.action_chains.ActionChains.click_and_hold

javascript-error avatar Mar 21 '21 14:03 javascript-error

@jsfehler I thought about that but the key_down/key_up methods take Keys, which is keyboard only if I am not mistaken. Is there a ways that I can send mouse keys on the key_down/key_up methods?

thlengane avatar Mar 22 '21 19:03 thlengane

I really don't know what you mean. The click_and_hold method I linked you to is exactly that.

javascript-error avatar Mar 23 '21 19:03 javascript-error