提交 e1f070bb 编写于 作者: J Jesse Glick

[JENKINS-15340] Do not try to click on links with onclick attributes as these require confirmation.

上级 fefb2d0b
......@@ -38,11 +38,9 @@ public class ManagementLinkTest extends HudsonTestCase {
*/
public void testLinks() throws Exception {
HtmlPage page = new WebClient().goTo("manage");
List<?> anchors = page.selectNodes("id('management-links')//*[@class='link']/a");
List<?> anchors = page.selectNodes("id('management-links')//*[@class='link']/a[not(@onclick)]");
assertTrue(anchors.size()>=8);
for(HtmlAnchor e : (List<HtmlAnchor>) anchors) {
if(e.getHrefAttribute().endsWith("reload"))
continue; // can't really click this
e.click();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册