spix
spix copied to clipboard
Add mouseClickWithWait and mouseClickWithButtonAndWait
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.