0
*** Setting ***
Library DateTime
Library OperatingSystem
Library Selenium2Library
Suite Teardown Close Application
Resource ../Custom Keywords/BrowserKeywords.robot
*** Test Cases ***
Create Case
Open Browser https://login.salesforce.com/ chrome
Sleep 5s
Maximize Browser Window
Input Text //input[@id='username'] XXXXXXXXXXXXXXXX
Input Password //input[@id='password'] XXXXXXXXXXXXXX
Click Button //input[@id='Login']
Sleep 2s
Click Element //li[contains(@id,'Case_Tab')]
Sleep 2s
Click Button //input[contains(@name,'new')]
Sleep 5s
Click Image //img[@alt='Contact Name Lookup (New Window)']
sleep 15s
Select Window title='Search ~ Salesforce - Developer Edition'
Sleep 5s
Select Frame //frame[@id="searchFrame"]
Input Text //input[@id='lksrch'] Test
Click Button //input[@name='go']
Close Window
Close all Browsers
KEYWORD Selenium2Library。選擇窗口標題= '搜索〜Salesforce的 - 開發版'
文檔:
選擇窗口匹配定位,並返回以前的窗口句柄。 開始/結束/經過:20170801 12:40:14.275/20170801 12:40:14.701/ 00:00:00.426
00:00:00.339 KEYWORD Selenium2Library。捕獲頁面截圖
12:40:14.700 FAIL NoSuchWindowException:消息:沒有這樣的窗口
(會話信息:鉻= 59.0.3071.115)(驅動程序信息: chromedriver = 2.29.461591 (62ebf098771772160f391d75e589dc567915b233),平臺=視窗NT 10.0.10586 x86_64的)