|
|
mScript functions are functions to be called from mScript tags. There are two types of mScript functions.
As a user, you do not need to know which type of function you are calling, however, they are documented in two separate documents (click on the links above).
Most of the expression parameters for the methods can be an expression that contains other method calls. For example:
<action code="$getText('$getData('myDS', 'myField')')"/>
In the example above, the method call $getData('myDS', 'myField') is executed first and the result from the call becomes the input parameter to the method call $getText('p1').
All parameters must be enclosed by a set of single quotes. The single quotes used to enclose the parameters should not be escaped with "\".
However single quotes in the expression value do need to be escaped (prefixed) with "\". For example:
<action code="$click('xpath=id(\'order\')')"/>
Notice that the single quotes around "order" are escaped as they are part of the value for the parameter.
If you plan to use xpath to locate the element on HTML page and have trouble finding the correct xpath string, you may want to check out xpath checker. It's an interactive application which generates xpath string when you click on the element on the web page.
In some rare case some special characters may cause problem to the mScript interpreter, in which case they can be encoded as follows (release 3.0):
New in Release 3.0 you can use WebMBT Builder to have mScript generates for you by right-mouse clicking on the element on the web page.