我正在尝试自动从github下载回购。我无法单击clone or download
按钮的元素。
代码试用:
open browser https://github.com/robotframework/SeleniumLibrary/ chrome
Click Element //a[contains(@class,'btn btn-sm btn-primary')]
HTML:
<summary class="btn btn-sm btn-primary">
Clone or download
<span class="dropdown-caret"></span>
</summary>
答案 0 :(得分:0)
要单击文本为克隆或下载的元素,可以使用以下解决方案:
open browser https://github.com/robotframework/SeleniumLibrary/ chrome
Click Element //summary[@class='btn btn-sm btn-primary']