![]() |
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. The caption is e.g. the visible and basicaly not changeable text of a GUI-Object. Visible text of pushbutton or link.
Parameter | Description |
---|---|
FN | Functionalname of the GUI-Object |
ExpVal | Expected value |
Keyword | Description |
---|---|
"" and ${IGNORE} | Don´t execute the keyword. (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_" |
EN.SelectWindow( "Login" )
- Set context to the Window Login
with the ChildObject you want to verify.EN.VerifyCaption( "OK", "Ok" )
** - then Verify the GUI-Object with the FN = "OK"
has a caption = "Ok"EN.VerifyCaption( "OK", "${EMPTY}" )
** - Verifyies that OK
has an empty (= "") captionThere are two ways to ignore a Keyword: Set the Parameter ExpVal
= "${IGNORE}"
or simply ""
EN.SelectWindow( "Login" )
EN.VerifyCaption( "OK", "" )
** - This ignores the execution of this Keyword FN = "User"
orEN.VerifyCaption( "OK", "${IGNORE}" )
** - This ignores the execution of this KeywordOn Windowssystems the Enviroment variable USERNAME
returns the name of the user who is currently logged on. OKW resolves the Enviroment variable ${USERNAME}
to the currently logged on username and uses this as expected value (ExpVal).
For this Example
EN.SelectWindow( "Login" )
EN.VerifyCaption( "User", "${USERNAME}" )
** - Matches the GUI-Object FN = "User"
with the current logged on username?Keyword | <-> | Called GUI-Adapter Method |
---|---|---|
EN.VerifyCaption( FN, ExpVal ) | <-> | public ArrayList<String> VerifyCaption( ) |