*** Settings *** Library Selenium2Library *** Test Cases *** music # 打开浏览器 Open Browser https://www.baidu.com/ gc # 智能等待 Set Browser Implicit Wait 30 # 浏览器最大化 Maximize Browser Window Input Text id=kw That Girl Click Button id=su Sleep 3s Click Element xpath= //*[contains(text(),"酷我音乐")] # 断言文本 Wait Until Page Contains 在线试听 30s Click Element xpath=//div[@class='op-musicsong c-row c-border']/div/div[3]/div[2]/div[3]/a Select Window new Wait Until Page Contains That Girl Click Element id=wp_playBtn Sleep 60 ${title} Get Title # 断言 Should Contain ${title} That Girl-Olly Murs-单曲-酷我音乐-好音质用酷我 # 关闭浏览器 Close All Browsers