Skip to content

Add mouseClickWithWait and mouseClickWithButtonAndWait #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

53845714nF
Copy link
Contributor

I create two new functions, mouseClickWithWait and mouseClickWithButtonAndWait.
These functions wait that an Element exist and then click. It saves the wait commands that would otherwise have to be made.

from xmlrpc.client import ServerProxy

session = ServerProxy('http://localhost:9000')

session.mouseClickWithWait('mainWindow/buttonImage', 400)
session.mouseClickWithButtonAndWait('mainWindow/buttonImage', 1,  400)

mouseClickWithWait have two parameters, the first the path and the second the timeout.
mouseClickWithButtonAndWait have the path, the mouse key and the timeout.

@faaxm
Copy link
Owner

faaxm commented Apr 9, 2025

I prefer to keep spix more limited to the base operations and leave "convenience wrappers" to the client side. Otherwise one could argue that every command could profit from an integrated waitForPath, doubling the methods. And while I cannot think of another interesting combination like this, I am a little bit afraid of the combinatorial explosion happening if anyone ever came up with one ;-)

This is exactly the same as "waitForPath(...); mouseClick(...);", or am I missing something?

@faaxm faaxm added the on-hold Waiting for other PRs to be merged first label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold Waiting for other PRs to be merged first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants