python - 我无法在 RIDE (ROBOT FRAMEWORK) 中运行简单的测试

标签 python automated-tests robotframework robotframework-ide

我试图运行我在 RIDE IDE 中编写的测试 我正在使用 SelenuimLibrary,并且正在尝试打开 Linkedin 登录页面

下面是代码

Library           Selenium2Library

*** Variables ***
${Username}       swtestacademy@gmail.com
${Password}       wrongpass
${Browser}        Firefox
${SiteUrl}        http://www.linkedin.com
${DashboardTitle}    World’s Largest Professional Network | LinkedIn
${ExpectedWarningMessage}    Hmm, we don't recognize that email. Please try again.
${WarningMessage}    Login Failed!
${Delay}          5s

*** Test Cases ***
Login Should Fail With Unregistered Mail Adress
    Open LinkedinPage
    Check Title
    Enter User Name
    Enter Wrong Password
    Click Login
    sleep    ${Delay}
    Assert Warning Message
    [Teardown]    Close Browser

*** Keywords ***
Open LinkedinPage
    open browser    ${SiteUrl}    ${Browser}
    Maximize Browser Window

Enter User Name
    Input Text    id=login-email    ${Username}

Enter Wrong Password
    Input Text    id=login-password    ${Password}

Click Login
    Click Button    css=[name=submit]

Check Title
    Title Should be    ${DashboardTitle}

Assert Warning Message
    Element Text Should Be    id=session_key-login-error    ${ExpectedWarningMessage}    ${WarningMessage}

这是我点击运行按钮时得到的输出,没有反馈 enter image description here

以下是完整消息:

*command: pybot.bat --argumentfile c:\users\farhat\appdata\local\temp\RIDEocku32.d\argfile.txt --listener C:\Python27\lib\site-packages\robotframework_ride-2.0a1-py2.7.egg\robotide\contrib\testrunner\TestRunnerAgent.py:53791:False "C:\Users\Farhat\Documents\My Workspace\Robot"

Python版本

Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)] on win32

最佳答案

命令 Pybot 已弃用,并已从机器人框架中删除。请尝试使用命令 Robot 代替,因此解决方案是您需要更新您的RIDE 因为您使用的是旧版本。

Find Latest Update RIDE

关于python - 我无法在 RIDE (ROBOT FRAMEWORK) 中运行简单的测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60954035/

相关文章:

python - 解密单字节 XOR 编码文件

selenium - 如何设置 Selenium RC 来测试互联网上的任何网站?

list - 如何将列表列表作为参数提供给机器人框架测试模板

python - 如何绑定(bind)泊松随机变量的样本来模拟到达

python - 类似的功能 - 一个有效,其余的无效 - 也许一双新的眼睛可以看到问题? (Python CGI)

python - codingbat python 字符串计数

selenium - 如何使用Selenium WebDriver(Eclipse)单击下拉列表(不是由select创建的)?

python - 如何使用 python 结构对远程服务器上存在的文件进行更改/编辑?

javascript - 如何使用 Robot Framework 处理提示框?

robotframework - 如何在 Windows 上安装 robotframework RIDE?