Skip to content

Commit 07b837e

Browse files
authored
Update to Appium 9.2.2 and Selenium 4.19.1 (#41)
1 parent 0fa0d7d commit 07b837e

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@
189189
<dependency>
190190
<groupId>com.github.aquality-automation</groupId>
191191
<artifactId>aquality-selenium-core</artifactId>
192-
<version>4.0.0</version>
192+
<version>4.0.1</version>
193193
</dependency>
194194

195195
<dependency>
196196
<groupId>io.appium</groupId>
197197
<artifactId>java-client</artifactId>
198-
<version>9.1.0</version>
198+
<version>9.2.2</version>
199199
</dependency>
200200

201201
<dependency>

src/main/java/aquality/appium/mobile/application/Application.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import aquality.selenium.core.configurations.ITimeoutConfiguration;
66
import aquality.selenium.core.localization.ILocalizedLogger;
77
import io.appium.java_client.AppiumDriver;
8+
import io.appium.java_client.InteractsWithApps;
89
import org.openqa.selenium.remote.service.DriverService;
910

1011
import java.time.Duration;
@@ -85,4 +86,13 @@ public void quit() {
8586
getDriverService().stop();
8687
}
8788
}
89+
90+
/**
91+
* Terminate the particular application if it is running.
92+
* @param bundleId the bundle identifier (or app id) of the app to be terminated.
93+
* @return true if the app was running before and has been successfully stopped.
94+
*/
95+
public boolean terminateApp(String bundleId) {
96+
return ((InteractsWithApps)getDriver()).terminateApp(bundleId);
97+
}
8898
}

src/test/java/samples/android/nativeapp/apidemos/screens/AndroidScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected void startActivity(Activity activity) {
2121
activity.getAppPackage());
2222
AndroidDriver driver = (AndroidDriver) AqualityServices.getApplication().getDriver();
2323
Map<String, Object> params = new HashMap<>();
24-
params.put("intent", activity.getAppPackage() + "/" + activity.getAppActivity());
24+
params.put("intent", String.format("%s/%s", activity.getAppPackage(), activity.getAppActivity()));
2525
params.put("package", activity.getAppPackage());
2626
driver.executeScript("mobile: startActivity", params);
2727
}

0 commit comments

Comments
 (0)