我试图用e-bay网站制作一个小型机器人框架,但每次我在我的点击元素中找不到定位器时,我都会尝试一切,甚至是睡觉,直到元素可见为止。我的代码是这个
*** Settings ***
Documentation Basic Search Functionality
Library SeleniumLibrary
*** variables ***
*** Test Cases ***
Verify basic search functionality
[documentation] This test case verifies the basic search functionality
[tags] Functional
Open Browser http://www.ebay.com chrome
Maximize Browser Window
Input Text //*[@id="gh-ac"] mobile
Press Keys //*[@id="gh-btn"] [Return]
Page Should Contain results for mobile
Sleep 10s
Wait Until Element Is Visible xpath=//*
[@id="nid-pZ5-4"]/button/span
Click Element xpath=//*[@id="nid-pZ5-
4"]/button/span
Close Browser
元素在图片中。 The element I am trying click it can be seen in the picture
这
xpath
看起来是对的。因为我在UI中找不到任何元素
请尝试以下方法:
相关问题 更多 >
编程相关推荐