@Target(value=PARAMETER) @Inherited @Retention(value=RUNTIME) public @interface GlobalReference
vani to use marked method parameter for provided global
reference value. This is only relevant in conjunction with custom call
functions.
A global reference could be used, to implements a page caching mechanism like
jquery elements. If you work with JQueryElement, you don't get the
actual element object from webDriver, because it returns only a
reference string. This reference string will be wrapped by
JQueryElement. If you call a method of that object. the wrapped
reference string is provided as parameter and the call function will look for
stored element identified by that value.
The following example, shows its usage. If vani calls the
corresponding custom call function, it will provide the reference string
contained by specified GlobalReferenceHolder as first parameter:
@JsCallFunction("classpath:vani-jquery-call.js")
public String call(@GlobalReference String reference, @JsFunctionName String functionName,
@JsFunctionArguments Object... args);
JsFunctionName,
JsCallFunction,
GlobalReferenceHolderCopyright © 2016. All rights reserved.