Skip to content

Commit

Permalink
added clickOnMenu(List<String> options, SearchType... searchTypes) me…
Browse files Browse the repository at this point in the history
…thod in Menu.java
  • Loading branch information
vculea committed Nov 5, 2024
1 parent 7c4c723 commit 669c33c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,25 @@
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.18.1</version>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>7.18.1</version>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>7.18.1</version>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>3.3.2</version>
<version>3.3.5</version>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -184,7 +184,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<version>3.3.2</version>
<version>3.3.5</version>
<exclusions>
<exclusion>
<groupId>com.jayway.jsonpath</groupId>
Expand All @@ -195,7 +195,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>3.3.2</version>
<version>3.3.5</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
Expand All @@ -218,7 +218,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
Expand All @@ -234,7 +234,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.3</version>
<version>3.5.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/unit/testng-unit.xml</suiteXmlFile>
Expand All @@ -245,7 +245,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -258,7 +258,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<version>3.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -271,7 +271,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
Expand All @@ -282,7 +282,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<version>3.13.0</version>
<configuration>
<source>17</source>
<target>17</target>
Expand All @@ -292,7 +292,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<version>1.7.0</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/sdl/selenium/extjs6/menu/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ public void clickOnMenu(String option, SearchType... searchTypes) {
}
}

public void clickOnMenu(List<String> 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);
Expand Down

0 comments on commit 669c33c

Please sign in to comment.