Extra classes that implementent miscellaneous needed functionailty
Decorator for unimplemented interfaces :type func: function
Re-exposes a classes keywords wrapped by robotremotelibrary.py
Custom keyword handlers rather than those reflected over RPC
Parameters: | PS – Pattern or str |
---|---|
Return type: | Match |
Find a particular GUI element, which is seen as the given image or just plain text. The given file name of an image specifies the element’s appearance. It searches within the region and returns the best match, which shows a similarity greater than the minimum similarity given by the pattern. If no similarity was set for the pattern by python_sikuli_client.pattern.Pattern.similar() before, a default minimum similarity of 0.7 is set automatically.
If autoWaitTimeout is set to a non-zero value, find() just acts as a wait().
Side Effect lastMatch: the best match can be accessed using getLastMatch() afterwards.
Decorator for unimplemented interfaces :type func: function
Parameters: | cls – class to use decorated function as constructor for |
---|
Uses func as a potential constructor for cls: func should return the string which when evaluated by jython gives the object we want.
@constructor(cls)
def func(*args, **kwargs):
...
Was finding this repoetitive. :param num_required: how many args are required in total :param keys: dict of keys and (bool) is_required (None ignores this) :param args: :param kwargs: some of these will not
Decorator factory returning a run_on_remote decorator which marshals and unmarshals the return type as rtype where rtype must be either a subclass of ClientSikuliClass, or the string name of a class in classes
Parameters: | rtype – return type |
---|
@return_from_remote(rtype)
def func(*args, **kwargs):
...
Parameters: | func – function to decorate |
---|
Runs the decorated function but discards the result, so you can use it for sanity-checking but should not use it for actual processing, as this will be done on the server side.
The decorated function can have a number of properties that modify the way it is run, each of which should be a function itself:
- func.arg(*args, **kwargs):
- The output of this will be used as args for the inner wrapper
- func.post(result):
- This takes the output of the inner wrapper, and its ouput is returned by the outer wrapper
- func.func(*args, **kwargs):
- Replaces the default inner function - should handle all interaction with the server
@run_on_remote
def func(*args, **kwargs):
...