mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
[JENKINS-15340] Do not try to click on links with onclick attributes as these require confirmation.
This commit is contained in:
1 parent
fefb2d0b5c
commit
e1f070bbef
1 file changed
+1
-3
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user