Skip to content

Commit

Permalink
Update to Appium 9.2.2 and Selenium 4.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mialeska committed Apr 12, 2024
1 parent 0fa0d7d commit cf6b5a9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium-core</artifactId>
<version>4.0.0</version>
<version>4.0.1</version>
</dependency>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>9.1.0</version>
<version>9.2.2</version>
</dependency>

<dependency>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/aquality/appium/mobile/application/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import aquality.selenium.core.configurations.ITimeoutConfiguration;
import aquality.selenium.core.localization.ILocalizedLogger;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.InteractsWithApps;
import org.openqa.selenium.remote.service.DriverService;

import java.time.Duration;
Expand Down Expand Up @@ -85,4 +86,13 @@ public void quit() {
getDriverService().stop();
}
}

/**
* Terminate the particular application if it is running.
* @param bundleId the bundle identifier (or app id) of the app to be terminated.
* @return true if the app was running before and has been successfully stopped.
*/
public boolean terminateApp(String bundleId) {
return ((InteractsWithApps)getDriver()).terminateApp(bundleId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected void startActivity(Activity activity) {
activity.getAppPackage());
AndroidDriver driver = (AndroidDriver) AqualityServices.getApplication().getDriver();
Map<String, Object> params = new HashMap<>();
params.put("intent", activity.getAppPackage() + "/" + activity.getAppActivity());
params.put("intent", String.format("%s/%s", activity.getAppPackage(), activity.getAppActivity()));
params.put("package", activity.getAppPackage());
driver.executeScript("mobile: startActivity", params);
}
Expand Down

0 comments on commit cf6b5a9

Please sign in to comment.