summaryrefslogtreecommitdiffstats
path: root/uitest-common
diff options
context:
space:
mode:
authorelmot <elmot@vaadin.com>2016-09-14 12:13:14 +0300
committerVaadin Code Review <review@vaadin.com>2016-09-19 05:44:39 +0000
commitedd8b9bd16a33fe6be3e5082c953aaf374884070 (patch)
tree30ff2f28aeee9411068a562b03a6e1b9e3e15740 /uitest-common
parent05c051717401660a857ee7a314361a1735f376e6 (diff)
downloadvaadin-framework-edd8b9bd16a33fe6be3e5082c953aaf374884070.tar.gz
vaadin-framework-edd8b9bd16a33fe6be3e5082c953aaf374884070.zip
Test and fix a CheckBoxGroup icon provider and item enabled provider
Change-Id: Ia3ed99478d19efc041cc4adaabd856ee69f3531b
Diffstat (limited to 'uitest-common')
-rw-r--r--uitest-common/src/main/java/com/vaadin/testbench/customelements/CheckBoxGroupElement.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/CheckBoxGroupElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/CheckBoxGroupElement.java
index b2dd93a7b0..9b234fa1cd 100644
--- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/CheckBoxGroupElement.java
+++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/CheckBoxGroupElement.java
@@ -46,6 +46,30 @@ public class CheckBoxGroupElement extends AbstractSelectElement {
return optionTexts;
}
+ public List<String> getOptionsCssClasses() {
+ List<String> optionTexts = new ArrayList<>();
+ List<WebElement> options = findElements(byButtonSpan);
+ for (WebElement option : options) {
+ optionTexts.add(option.getAttribute("class"));
+ }
+ return optionTexts;
+ }
+
+ public List<String> getOptionsIconUrls() {
+ List<String> icons = new ArrayList<>();
+ List<WebElement> options = findElements(byButtonSpan);
+ for (WebElement option : options) {
+ List<WebElement> images = option.findElements(By.tagName("img"));
+ if (images != null && images.size() > 0) {
+ icons.add(images.get(0).getAttribute("src"));
+ } else {
+ icons.add(null);
+ }
+
+ }
+ return icons;
+ }
+
public void selectByText(String text) throws ReadOnlyException {
if (isReadOnly()) {
throw new ReadOnlyException();
@@ -103,4 +127,5 @@ public class CheckBoxGroupElement extends AbstractSelectElement {
"Clear operation is not supported for CheckBoxGroup."
+ " This operation has no effect on the element.");
}
+
}