summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2019-12-05 17:04:45 +0200
committerYoav Schneiderman <yoav.schneiderman@intl.att.com>2019-12-08 14:20:44 +0200
commit77dd486269bb11f1e206114b87033a7dcc58c012 (patch)
tree8df5710c6f184a2f58837b48df94009f2db39248 /vid-automation/src/main/java/org/onap
parentad530ef6478ed2c8d3d153738ed735130b4019e7 (diff)
Changing VNF platform to multiselect + cypress + API
Issue-ID: VID-724 Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com> Change-Id: Ie8c720974da3419e26ce7e8675622f75780581b9 Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-automation/src/main/java/org/onap')
-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();