【发布时间】:2020-06-29 16:50:09
【问题描述】:
这是我在机器人框架中的第一个也是简单的代码,我只是想在谷歌搜索框中输入文本然后关闭浏览器,但它一直失败。
*** Settings ***
Documentation Suite description
Library Selenium2Library
*** Variables ***
${Browser} chrome
${URL} https://www.google.com/
${text} ab
*** Test Cases ***
TC 001 Browser Open and Close
Open Browser ${URL} ${Browser}
Set Browser Implicit Wait 5
Input Text name=q ab
Close Browser
错误信息 -
WebDriverException:消息:未知错误:调用函数结果缺少“值” (会话信息:chrome=80.0.3987.132) (驱动程序信息:chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),平台=Windows NT 10.0.17763 x86_64) 强文本 奇怪的事情,如果我只在它下面运行它工作正常,所以我怀疑它与我试图在谷歌搜索框中插入文本的步骤有关
*** Settings ***
Documentation Suite description
Library Selenium2Library
*** Variables ***
${Browser} chrome
${URL} https://www.google.com/
${text} ab
*** Test Cases ***
TC 001 Browser Open and Close
Open Browser ${URL} ${Browser}
Set Browser Implicit Wait 5
Close Browser
【问题讨论】: