Change Timeout

Arguments

  • seconds

Change the timeout for connection in seconds.

Change Wait Time

Arguments

  • 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:

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

Arguments

  • 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:

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

Arguments

Disconnect from the host.

Delete Char

Arguments

  • ypos=None
  • xpos=None

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

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

Arguments

  • ypos=None
  • xpos=None

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.

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

Arguments

  • cmd

Execute an x3270 command.

Examples:

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

Move Next Field

Arguments

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

Move Previous Field

Arguments

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

Open Connection

Arguments

  • host
  • LU=None
  • port=23

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.

Example:

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

Page Should Contain All Strings

Arguments

  • list_string
  • ignore_case=False
  • error_message=None

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

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.

Example:

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

Arguments

  • list_string
  • ignore_case=False
  • error_message=None

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

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.

Example:

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

Arguments

  • txt
  • ignore_case=False
  • error_message=None

Fails unless the given string matches the given pattern.

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.

Example:

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

Arguments

  • txt
  • ignore_case=False
  • error_message=None

Search if a given string exists on the mainframe screen.

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.

Example:

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

Arguments

  • txt
  • number
  • ignore_case=False
  • error_message=None

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

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.

Example:

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

Arguments

  • 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

Arguments

  • list_string
  • ignore_case=False
  • error_message=None

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.

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.

Example:

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

Arguments

  • list_string
  • ignore_case=False
  • error_message=None

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.

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.

Example:

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

Arguments

  • txt
  • ignore_case=False
  • error_message=None

Fails if the given string matches the given pattern.

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.

Example:

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

Arguments

  • txt
  • ignore_case=False
  • error_message=None

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

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.

Example:

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

Arguments

  • 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

Arguments

  • ypos
  • xpos
  • length

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

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

Arguments

Send a Enter to the screen.

Send PF

Arguments

  • PF

Send a Program Function to the screen.

Example:

Send PF 3

Set Screenshot Folder

Arguments

  • path

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

Example:

Set Screenshot Folder C:\\Temp\\Images

Take Screenshot

Arguments

  • height=410
  • width=670

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

Arguments

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

Arguments

  • txt
  • timeout=5

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.

Example:

Wait Until String something
Wait Until String something timeout=10

Write

Arguments

  • txt

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

Example:

Write something

Write Bare

Arguments

  • txt

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

Example:

Write Bare something

Write Bare In Position

Arguments

  • txt
  • ypos
  • xpos

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

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

Example:

Write Bare in Position something 9 11

Write In Position

Arguments

  • txt
  • ypos
  • xpos

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

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

Example:

Write in Position something 9 11