Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Appium 9.2.2 and Selenium 4.19.1 #40

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading