List of OKW Constants

Hrabovszki1023 edited this page Oct 4, 2018 · 44 revisions

The following OKW constants are reserved.

OKW constants Description
[[${DELETE} List-of-OKW-Constants#delete]]
[[${IGNORE} List-of-OKW-Constants#ignore]]
[[${EMPTY} List-of-OKW-Constants#empty]]
[[${SEP} List-of-OKW-Constants#sep]]
[[${VSEP}, ${HSEP} List-of-OKW-Constants#vsep]]
------------------- :-------------
[[${TCN} List-of-OKW-Constants#tcn]]
------------------- :-------------
[[${WINDOW} List-of-OKW-Constants#window]]
[[${CHILD} List-of-OKW-Constants#child]]

${DELETE}

The value of the GUI object will be deleted/cleared.

EN.TypeKey( "Name", "${DELETE}" )
EN.TypeKey( "Name", "${DELETE}${SEP}Second Value" )

EN.SetValue( "Name", "${DELETE}" )
EN.SetValue( "Name", "${DELETE}${SEP}Second Value" )

EN.Select( "Artist", "${DELETE}" )
EN.Select( "Artist", "${DELETE}${SEP}Frank Zappa${SEP}Rex Gildo" )

Note: Are values already selected in a GUI object, then these can be cleared with ${DELETE}. These ${DELETE} is specified as the first value:

EN.Select( "Artist", "${DELETE}${SEP}Frank Zappa${SEP}Rex Gildo" )

Technical Note

Deleting the value in the GUI objects is implemented by the GUI Adapter (e.g. SeTextField, SeListBox).

When deleting a GUI object is not possible (for example, selection list does not have the condition $ {EMPTY}), then the GUI property of GUI adapter must be considered.

${IGNORE}

A OKW-keyword is skipped when ${IGNORE} is entered as a value. This constant is important when re-usable sequences. With this, the activities of the OKW-keywords can be turned off in data-driven test.

EN.Select( "Artist", "${IGNORE}" )
EN.TypeKey( "Artist", "${IGNORE}" )
EN.VerifyValue( "Artist", "${IGNORE}" )

Important: "" (empty string) is equivalent to ${IGNORE}. The following example is equivalent to the previous example.

EN.Select ( "Artist", "" )
EN.TypeKey ( "Artist", "" )
EN.VerifyValue ( "Artist", "" )

${IGNORE} may not be combined with other values. - It will raise an exception and a test case is terminated.

Technical Note

${IGNORE} is evaluated by the OK class. The OKW-Method of a GUI-Adapter (LFC) is not called in this case.

${EMPTY}

The OKW constant ${EMPTY} is necessary for the "VerifyValue"-keywords:

EN.VerifyValue( "Name", "${EMPTY}" )

Note: VerifyValue( "Name", "" ) ignores the execution of the keyword. In other words, nothing is checked.

Technical Note

The evaluation of ${EMPTY} occurs in the class OK: OK converts ${EMPTY} to "" and compares this with the current value of the GUI object.

${SEP}

${SEP} is used to separate values. E.g. multiple selection in a ListBox.

EN.Select( "Artist" = "Frank Zappa${SEP}Rex Gildo" )

Technical Note

The separation of the values are in the OK class. The values are further processed in the GUI adapters as a list.

${TCS}

${TCS} holds the current test case name.

EN.TestBegin( "This is my first test case" ); // The KeyWord TestBegin() sets TCN="This is my first test case" 
EN.SelectWindow( "MyWindow" );
EN.SetValue( "Comment", "${TCS}" ); // GUI-Object with FN="Comment" is set to "This is my first test case"
EN.VerifyValue( "Comment", "This is my first test case" )
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.