Change Timeout

Change the timeout for connection in seconds.

Arguments

Argument Type Default value Description
seconds

Change Wait Time

To give time for the mainframe screen to be "drawn" and receive the next commands, a "wait time" has been created, which by default is set to 0.5 seconds. This is a sleep applied AFTER the follow keywords:

Arguments

Argument Type Default value Description
wait_time

Execute Command Send Enter Send PF Write Write in position

If you want to change this value just use this keyword passing the time in seconds.

Examples:

Change Wait Time 0.1
Change Wait Time 2

Change Wait Time After Write

To give the user time to see what is happening inside the mainframe, a "change wait time after write" has been created, which by default is set to 0 seconds. This is a sleep applied AFTER the string sent in this keywords:

Arguments

Argument Type Default value Description
wait_time_after_write

Write Write Bare Write in position Write Bare in position

If you want to change this value just use this keyword passing the time in seconds.

Note: This keyword is useful for debug purpose

Examples:

Change Wait Time After Write 0.5
Change Wait Time After Write 2

Close Connection

Disconnect from the host.

Delete Char

Delete character under cursor. If you want to delete a character that is in another position, simply pass the coordinates "ypos"/"xpos".

Arguments

Argument Type Default value Description
yposNone
xposNone

Co-ordinates are 1 based, as listed in the status area of the terminal.

Examples:

Delete Char
Delete Char ypos=9 xpos=25

Delete Field

Delete a entire contents in field at current cursor location and positions cursor at beginning of field. If you want to delete a field that is in another position, simply pass the coordinates "ypos"/"xpos" of any part of the field.

Arguments

Argument Type Default value Description
yposNone
xposNone

Co-ordinates are 1 based, as listed in the status area of the terminal.

Examples:

Delete Field
Delete Field ypos=12 xpos=6

Execute Command

Execute an [http://x3270.bgp.nu/wc3270-man.html#Actions|x3270 command].

Arguments

Argument Type Default value Description
cmd

Execute an x3270 command.

Examples:

Execute Command Enter
Execute Command Home
Execute Command Tab
Execute Command PF(1)

Move Next Field

Move the cursor to the next input field. Equivalent to pressing the Tab key.

Move Previous Field

Move the cursor to the previous input field. Equivalent to pressing the Shift+Tab keys.

Open Connection

Create a connection with IBM3270 mainframe with the default port 23. To make a connection with the mainframe you only must inform the Host. You can pass the Logical Unit Name and the Port as optional.

Arguments

Argument Type Default value Description
host
LUNone
port23

Examples

Open Connection Hostname
Open Connection Hostname LU=LUname
Open Connection Hostname port=992

Page Should Contain All Strings

Search if all of the strings in a given list exists on the mainframe screen.

Arguments

Argument Type Default value Description
list_string
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Contain All Strings ${list_of_string}
Page Should Contain All Strings ${list_of_string} ignore_case=${True}
Page Should Contain All Strings ${list_of_string} error_message=New error message

Page Should Contain Any String

Search if one of the strings in a given list exists on the mainframe screen.

Arguments

Argument Type Default value Description
list_string
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Contain Any String ${list_of_string}
Page Should Contain Any String ${list_of_string} ignore_case=${True}
Page Should Contain Any String ${list_of_string} error_message=New error message

Page Should Contain Match

Fails unless the given string matches the given pattern.

Arguments

Argument Type Default value Description
txt
ignore_caseFalse
error_messageNone

Pattern matching is similar as matching files in a shell, and it is always case-sensitive. In the pattern, * matches to anything and ? matches to any single character.

Note that the entire screen is only considered a string for this keyword, so if you want to search for the string "something" and it is somewhere other than at the beginning or end of the screen it should be reported as follows: *something*

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Contain Match *something*
Page Should Contain Match *so???hing*
Page Should Contain Match *someTHING* ignore_case=${True}
Page Should Contain Match *something* error_message=New error message

Page Should Contain String

Search if a given string exists on the mainframe screen.

Arguments

Argument Type Default value Description
txt
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Contain String something
Page Should Contain String someTHING ignore_case=${True}
Page Should Contain String something error_message=New error message

Page Should Contain String X Times

Search if the entered string appears the desired number of times on the mainframe screen.

Arguments

Argument Type Default value Description
txt
number
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Contain String X Times something 3
Page Should Contain String X Times someTHING 3 ignore_case=${True}
Page Should Contain String X Times something 3 error_message=New error message

Page Should Match Regex

Fails if string does not match pattern as a regular expression. Regular expression check is implemented using the Python [https://docs.python.org/2/library/re.html|re module]. Python's regular expression syntax is derived from Perl, and it is thus also very similar to the syntax used, for example, in Java, Ruby and .NET.

Arguments

Argument Type Default value Description
regex_pattern

Fails if string does not match pattern as a regular expression. Regular expression check is implemented using the Python re module. Python's regular expression syntax is derived from Perl, and it is thus also very similar to the syntax used, for example, in Java, Ruby and .NET.

Backslash is an escape character in the test data, and possible backslashes in the pattern must thus be escaped with another backslash (e.g. \\d\\w+).

Page Should Not Contain All Strings

Fails if one of the strings in a given list exists on the mainframe screen. if one of the string are found, the keyword will raise a exception.

Arguments

Argument Type Default value Description
list_string
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Not Contain All Strings ${list_of_string}
Page Should Not Contain All Strings ${list_of_string} ignore_case=${True}
Page Should Not Contain All Strings ${list_of_string} error_message=New error message

Page Should Not Contain Any String

Fails if one or more of the strings in a given list exists on the mainframe screen. if one or more of the string are found, the keyword will raise a exception.

Arguments

Argument Type Default value Description
list_string
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Not Contain Any Strings ${list_of_string}
Page Should Not Contain Any Strings ${list_of_string} ignore_case=${True}
Page Should Not Contain Any Strings ${list_of_string} error_message=New error message

Page Should Not Contain Match

Fails if the given string matches the given pattern.

Arguments

Argument Type Default value Description
txt
ignore_caseFalse
error_messageNone

Pattern matching is similar as matching files in a shell, and it is always case-sensitive. In the pattern, * matches to anything and ? matches to any single character.

Note that the entire screen is only considered a string for this keyword, so if you want to search for the string "something" and it is somewhere other than at the beginning or end of the screen it should be reported as follows: *something*

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Not Contain Match *something*
Page Should Not Contain Match *so???hing*
Page Should Not Contain Match *someTHING* ignore_case=${True}
Page Should Not Contain Match *something* error_message=New error message

Page Should Not Contain String

Search if a given string NOT exists on the mainframe screen.

Arguments

Argument Type Default value Description
txt
ignore_caseFalse
error_messageNone

The search is case sensitive, if you want ignore this you can pass the argument: ignore_case=${True} and you can edit the raise exception message with error_message.

Examples

Page Should Not Contain String something
Page Should Not Contain String someTHING ignore_case=${True}
Page Should Not Contain String something error_message=New error message

Page Should Not Match Regex

Fails if string does match pattern as a regular expression. Regular expression check is implemented using the Python [https://docs.python.org/2/library/re.html|re module]. Python's regular expression syntax is derived from Perl, and it is thus also very similar to the syntax used, for example, in Java, Ruby and .NET.

Arguments

Argument Type Default value Description
regex_pattern

Fails if string does match pattern as a regular expression. Regular expression check is implemented using the Python re module. Python's regular expression syntax is derived from Perl, and it is thus also very similar to the syntax used, for example, in Java, Ruby and .NET.

Backslash is an escape character in the test data, and possible backslashes in the pattern must thus be escaped with another backslash (e.g. \\d\\w+).

Read

Get a string of "length" at screen co-ordinates "ypos"/"xpos".

Arguments

Argument Type Default value Description
ypos
xpos
length

Co-ordinates are 1 based, as listed in the status area of the terminal.

Example for read a string in the position y=8 / x=10 of a length 15:

${value} Read 8 10 15

Send Enter

Send a Enter to the screen.

Send PF

Send a Program Function to the screen.

Arguments

Argument Type Default value Description
PF

Examples

Send PF 3

Set Screenshot Folder

Set a folder to keep the html files generated by the `Take Screenshot` keyword.

Arguments

Argument Type Default value Description
path

Set a folder to keep the html files generated by the Take Screenshot keyword.

Examples

Set Screenshot Folder C:\\Temp\\Images

Take Screenshot

Generate a screenshot of the IBM 3270 Mainframe in a html format. The default folder is the log folder of RobotFramework, if you want change see the `Set Screenshot Folder`.

Arguments

Argument Type Default value Description
height410
width670

Generate a screenshot of the IBM 3270 Mainframe in a html format. The default folder is the log folder of RobotFramework, if you want change see the Set Screenshot Folder.

The Screenshot is printed in a iframe log, with the values of height=410 and width=670, you can change this values passing them from the keyword.

Examples:

Take Screenshot
Take Screenshot height=500 width=700

Wait Field Detected

Wait until the screen is ready, the cursor has been positioned on a modifiable field, and the keyboard is unlocked.

Sometimes the server will "unlock" the keyboard but the screen will not yet be ready. In that case, an attempt to read or write to the screen will result in a 'E' keyboard status because we tried to read from a screen that is not yet ready.

Using this method tells the client to wait until a field is detected and the cursor has been positioned on it.

Wait Until String

Wait until a string exists on the mainframe screen to perform the next step. If the string not appear on 5 seconds the keyword will raise a exception. You can define a different timeout.

Arguments

Argument Type Default value Description
txt
timeout5

Examples

Wait Until String something
Wait Until String something timeout=10

Write

Send a string to the screen at the current cursor location *and a Enter.*

Arguments

Argument Type Default value Description
txt

Send a string to the screen at the current cursor location and a Enter.

Examples

Write something

Write Bare

Send only the string to the screen at the current cursor location.

Arguments

Argument Type Default value Description
txt

Examples

Write Bare something

Write Bare In Position

Send only the string to the screen at screen co-ordinates "ypos"/"xpos".

Arguments

Argument Type Default value Description
txt
ypos
xpos

Co-ordinates are 1 based, as listed in the status area of the terminal.

Examples

Write Bare in Position something 9 11

Write In Position

Send a string to the screen at screen co-ordinates "ypos"/"xpos" and a Enter.

Arguments

Argument Type Default value Description
txt
ypos
xpos

Co-ordinates are 1 based, as listed in the status area of the terminal.

Examples

Write in Position something 9 11