Skip to content

Commit 3dc792d

Browse files
committed
fix and simplify checking if a plugin is checked to be installed
1 parent 479037f commit 3dc792d

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/main/java/org/jenkinsci/test/acceptance/po/WizardCustomizeJenkins.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,7 @@ public void selectSuggested() {
125125
}
126126

127127
private boolean isSelected(String pluginKey) {
128-
return driver
129-
.findElements(by.xpath(
130-
"//div[contains(@class, 'plugins-for-category')]/div[contains(@class, 'plugin') and contains(@class, 'selected') and contains(@class, '%s')]",
131-
pluginKey))
132-
.stream()
133-
.findFirst()
134-
.isPresent();
128+
return driver.findElement(by.id("chk-" + pluginKey)).isSelected();
135129
}
136130

137131
private List<WebElement> getSelected() {

0 commit comments

Comments
 (0)