大型机测试中的机器人框架

时间:2018-09-12 08:57:15

标签: automated-tests robotframework mainframe

我正在尝试在大型机测试中编写一个简单的.robot脚本。使用下面的库连接到wc3270.exe终端。

https://github.com/pedrommvv/x3270-robot

这是我的示例.robot脚本。

*** Settings ***
Library           Automation3270.py

*** Variables ***
${hostname}       XXXX

*** Test Cases ***
Should be able to Open Terminal
    Open MainConnection
    Enter Logon

*** Keywords ***
Open MainConnection
    Open 3270    |${hostname}

Enter Logon
    Input Text On Field    24  1  'logon'

尽管“ Open MainConnection”步骤成功执行,当我尝试使用x和y坐标将输入字符串发送到wc3270.exe时,遇到以下错误。

  

不允许发送或接收数据的请求,因为套接字是   未连接和(当使用sendto在数据报套接字上发送时   通话)。没有提供地址。

非常感谢您的帮助。

1 个答案:

答案 0 :(得分:-1)

尝试使用Mainframe3270 https://github.com/Altran-PT-GDC/Robot-Framework-Mainframe-3270-Library

这应该有效:

*** Settings ***
Library           Mainframe3270.py

*** Variables ***
${hostname}       XXXX

*** Test Cases ***
Should be able to Open Terminal
    Open MainConnection
    Enter Logon

*** Keywords ***
Open MainConnection
    Open Connection    ${hostname}

Enter Logon
    Wait Field Detected
    Write Bare In Position    1    24    logon