【问题标题】:No keyword with name 'Press Key Native' found未找到名称为“Press Key Native”的关键字
【发布时间】:2013-11-24 00:12:51
【问题描述】:

我正在尝试设置测试,但遇到了问题。

我正在使用Press Key Native 关键字。 http://robotframework-seleniumlibrary.googlecode.com/hg/doc/SeleniumLibrary.html?r=2.5#Press%20Key%20Native 我收到以下错误。

------------------------------------------------------------------------------
Test Filter                                                           | FAIL |
No keyword with name 'Press Key Native' found.
------------------------------------------------------------------------------

我的代码是:

Test Filter
    Press Key Native    80
    Press Key Native    9
    Press Key Native    80
    Press Key Native    10
    Press Key Native    80
    Press Key Native    9
    Press Key Native    80
    Press Key Native    10
    Open Browser To Startpage
    Press Key Native    80
    Press Key Native    9
    Press Key Native    80
    Press Key Native    10
    Press Key Native    80
    Press Key Native    9
    Press Key Native    80
    Press Key Native    10
    Open Browser To Google

我在网上找遍了,一无所获。 :-(

非常感谢任何帮助!

【问题讨论】:

  • 你导入 SeleniumLibrary 了吗?你真的在使用 SeleniumLibrary,而不是没有 Press Key Native 的 Selenium2Library?
  • 谢谢你,Harri,你解决了我的问题!我正在使用 Selenium2Library。我不能对评论 +1,但否则我会。

标签: robotframework


【解决方案1】:

您提到的关键字是 SeleniumLibrary 的一部分,它是一个旧的硒库。大多数人使用的是 Selenium2Library,它没有那个关键字。根据对评论的回答,您似乎正在使用较新的 Selenium2Library,这就是它找不到关键字的原因。

【讨论】:

    猜你喜欢
    • 2016-10-14
    • 2021-01-08
    • 2018-04-25
    • 1970-01-01
    • 2015-01-10
    • 2019-12-02
    • 1970-01-01
    • 2017-07-19
    相关资源
    最近更新 更多