![]() |
OpenKeyWord
Build_ID: 457, Datum: 01.02.2020 07:45:48
Dont repeat yourself. - Do it once and only once!
|
Keyword verifies the caption of a GUI-Object ( #97 ). The caption is the visible and basicaly not changeable text of a GUI-Object: E.g. the visible text of pushbutton or link.
wildcards - yes regular expression - no
Parameter | Description |
---|---|
FN | Functionalname of the GUI-object |
ExpVal | Expected value. Wildcards are possible. |
ExpVal
ValuesKeyword | Description |
---|---|
"" and ${IGNORE} | Don´t execute the keyword. Interesting for data-driven testing |
${EMPTY} | The Expected value is empty or "" |
${ _ENV_} | Expected value is empty or "" |
${ _MEMKEY_} | OKW Parser substitutes with the Value memorized to Key "_MEMKEY_" |
Wildcard | Description |
---|---|
? | Masks exact one character. |
* | Masks 0-n character. |
# | Masks exact one numeric character [0-9]. |
EN.SelectWindow( "Login" )
- Set context to the Window Login
with the ChildObject you want to verify.EN.VerifyCaptionWCM( "User", "Zoltan" )
** - then Verify the GUI-Object with the FN = "User"
matches exact to the given expected value.EN.SelectWindow( "Login" )
- Set context to the Window Login
with the ChildObject you want to verify.
EN.VerifyCaptionWCM( "User", "?oltan" )
** - True with: Zoltan
, ooltan
Fail with oltan
, oltan
and oltann
EN.VerifyCaptionWCM( "User", "*ltan" )
** - True with: Zoltan
, ooltan
Fail with tan
, `oltann
EN.VerifyCaptionWCM( "User", "${EMPTY}" )
** - Verifies that User
is empty (= "")There are two ways to ignore a Keyword: Set the Parameter ExpVal
= "${IGNORE}"
or simply ""
EN.SelectWindow( "Login" )
EN.VerifyCaptionWCM( "User", "" )
** - Don´t Verify the GUI-Object FN = "User"
On Windowssystems the Enviromentvar ´USERNAMEreturns the name of the user who is currently logged on. OKW resolves the Enviroment var
${USERNAME}` to currently logged on username and uses this as expected value (ExpVal).
EN.SelectWindow( "Login" )
EN.VerifyCaptionWCM( "User", "${USERNAME}" )
** - Verify the GUI-Object FN = "User"
Keyword | <-> | Called GUI-Adapter Method |
---|---|---|
EN.VerifyCaptionWCM( FN, ExpVal ) | <-> | public ArrayList<String> VerifyCaption( ) |