【发布时间】:2014-05-13 09:41:29
【问题描述】:
我刚开始使用 Robot Framework,我编写了应该通过但没有通过的简单测试。屏幕截图清楚地显示了这些元素在网站上。以下是几个例子:
Page Should Contain Element name websiteRegistration
或
Page Should Contain Sign in and start watching
查找文本。
整个resource.txt描述如下:
*** Settings ***
Documentation A resource file with reusable keywords and variables.
...
... The system specific keywords created here form our own
... domain specific language. They utilize keywords provided
... by the imported Selenium2Library.
Library Selenium2Library
*** Variables ***
${SERVER} localhost:8080
${BROWSER} Firefox
${DELAY} 20
${HOME URL} http://${SERVER}/some-link-that-works
*** Keywords ***
Open Browser To Welcome Page
Open Browser ${HOME URL} ${BROWSER}
Check If It Works
Set Selenium Speed ${DELAY}
Page Should Contain Sign in and start watching
感谢您的帮助!!
【问题讨论】: