From 669c33c91300f83a3cc3ab88b12620376f42d529 Mon Sep 17 00:00:00 2001 From: vculea Date: Tue, 5 Nov 2024 09:55:41 +0200 Subject: [PATCH] added clickOnMenu(List options, SearchType... searchTypes) method in Menu.java --- pom.xml | 26 +++++++++---------- .../com/sdl/selenium/extjs6/menu/Menu.java | 15 +++++++++++ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 5054b485..78e84e4e 100644 --- a/pom.xml +++ b/pom.xml @@ -150,25 +150,25 @@ io.cucumber cucumber-java - 7.18.1 + 7.20.1 test io.cucumber cucumber-spring - 7.18.1 + 7.20.1 test io.cucumber cucumber-junit - 7.18.1 + 7.20.1 test org.springframework.boot spring-boot-starter - 3.3.2 + 3.3.5 org.apache.logging.log4j @@ -184,7 +184,7 @@ org.springframework.boot spring-boot-starter-test test - 3.3.2 + 3.3.5 com.jayway.jsonpath @@ -195,7 +195,7 @@ org.springframework.boot spring-boot-autoconfigure - 3.3.2 + 3.3.5 org.jsoup @@ -218,7 +218,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.4.2 @@ -234,7 +234,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.3 + 3.5.1 src/test/resources/unit/testng-unit.xml @@ -245,7 +245,7 @@ org.apache.maven.plugins maven-source-plugin - 3.3.0 + 3.3.1 attach-sources @@ -258,7 +258,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.10.1 attach-javadocs @@ -271,7 +271,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.1 + 3.1.1 true false @@ -282,7 +282,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.12.1 + 3.13.0 17 17 @@ -292,7 +292,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true diff --git a/src/main/java/com/sdl/selenium/extjs6/menu/Menu.java b/src/main/java/com/sdl/selenium/extjs6/menu/Menu.java index 1df0a150..37f1dab6 100644 --- a/src/main/java/com/sdl/selenium/extjs6/menu/Menu.java +++ b/src/main/java/com/sdl/selenium/extjs6/menu/Menu.java @@ -40,6 +40,21 @@ public void clickOnMenu(String option, SearchType... searchTypes) { } } + public void clickOnMenu(List options, SearchType... searchTypes) { + ready(); + String idChild = null; + for (String option : options) { + if (idChild != null) { + setId(idChild); + } + WebLink link = getWebLink(this, option, searchTypes); + boolean click = link.doClick(); + if (click) { + idChild = link.getAttribute("aria-owns"); + } + } + } + public boolean checkInMenu(String option, SearchType... searchTypes) { ready(); Item item = new Item(this, option, searchTypes);