aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main/java/org')
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java
index b10636bf1..e834c15ac 100644
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java
+++ b/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java
@@ -475,6 +475,18 @@ public final class GeneralUIUtils {
return element;
}
+ public static boolean isOptionSelectedInMultiSelect(String dataTestId, String option) {
+ GeneralUIUtils.ultimateWait();
+ List<WebElement> selectedElements = getDriver().findElements(By.xpath("//*[@data-tests-id='" + dataTestId + "']//span[@class='c-label']"));
+
+
+ for (WebElement selectedElement : selectedElements) {
+ if (selectedElement.getText().equals(option)) {
+ return true;
+ }
+ }
+ return false;
+ }
public static WebElement getSelectedElementFromDropDown(String dataTestId){
GeneralUIUtils.ultimateWait();;
WebElement selectedElement = new Select (getDriver().findElement(By.xpath("//*[@data-tests-id='" + dataTestId + "']"))).getFirstSelectedOption();