Skip to content

Commit

Permalink
[JENKINS-15340] Do not try to click on links with onclick attributes …
Browse files Browse the repository at this point in the history
…as these require confirmation.(cherry picked from commit e1f070b)
  • Loading branch information
jglick authored and vjuranek committed Apr 15, 2013
1 parent e3f905f commit d7f7a4a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/src/test/java/hudson/model/ManagementLinkTest.java
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit d7f7a4a

Please sign in to comment.