Robot Framework::Gherkin 执行错误
Robot Frame Work:: Gherkin execution error
我写了我的第一个 Gherkin 脚本 (first.robot) 当 运行 相同时我得到 "No keyword with name 'Given' found."
错误。有没有我必须包含的库,或者我应该做任何 pip install 东西吗??
***
Gherkin Style TC
[Documentation] Let me try this time
Given Environement Setup Ready
When Required URL Get Loaded
Then Wait For Meters List to Appear
And Capture the list of Meters
Then CloseBrowser
***
您在 Given
(和其他)之后有两个 space,但机器人使用两个 space 将关键字与参数分开。 Given
、When
等后面必须只有一个space,否则机器人会认为Given
是关键字。
Gherkin Style TC
[Documentation] Let me try this time
Given Environement Setup Ready
When Required URL Get Loaded
Then Wait For Meters List to Appear
And Capture the list of Meters
Then CloseBrowser
有些人在 given/when/then 之前添加额外的 space 以使事情排列得很好:
Gherkin Style TC
[Documentation] Let me try this time
Given Environement Setup Ready
When Required URL Get Loaded
Then Wait For Meters List to Appear
And Capture the list of Meters
Then CloseBrowser
我写了我的第一个 Gherkin 脚本 (first.robot) 当 运行 相同时我得到 "No keyword with name 'Given' found."
错误。有没有我必须包含的库,或者我应该做任何 pip install 东西吗??
***
Gherkin Style TC
[Documentation] Let me try this time
Given Environement Setup Ready
When Required URL Get Loaded
Then Wait For Meters List to Appear
And Capture the list of Meters
Then CloseBrowser
***
您在 Given
(和其他)之后有两个 space,但机器人使用两个 space 将关键字与参数分开。 Given
、When
等后面必须只有一个space,否则机器人会认为Given
是关键字。
Gherkin Style TC
[Documentation] Let me try this time
Given Environement Setup Ready
When Required URL Get Loaded
Then Wait For Meters List to Appear
And Capture the list of Meters
Then CloseBrowser
有些人在 given/when/then 之前添加额外的 space 以使事情排列得很好:
Gherkin Style TC
[Documentation] Let me try this time
Given Environement Setup Ready
When Required URL Get Loaded
Then Wait For Meters List to Appear
And Capture the list of Meters
Then CloseBrowser