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.3 and Selenium 4.22.0 #43

Merged
merged 1 commit into from
Jul 17, 2024
Merged
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
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,19 @@
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium-core</artifactId>
<version>4.0.2</version>
<version>4.0.3</version>
</dependency>

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

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.9.0</version>
<version>7.10.2</version>
<scope>test</scope>
</dependency>

Expand All @@ -215,7 +215,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.15.1</version>
<version>2.16.1</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import aquality.selenium.core.utilities.ISettingsFile;
import aquality.selenium.core.utilities.JsonSettingsFile;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.remote.options.BaseOptions;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -27,9 +26,9 @@ private ISettingsFile getDevicesSettingsFile() {
}

@Override
public Capabilities getCapabilities() {
public BaseOptions<?> getCapabilities() {
Map<String, Object> deviceCapabilities = getCapabilitiesFromSettings();
DesiredCapabilities capabilities = new DesiredCapabilities();
BaseOptions<?> capabilities = new BaseOptions<>();
deviceCapabilities.forEach(capabilities::setCapability);
return capabilities;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import aquality.appium.mobile.application.PlatformName;
import aquality.selenium.core.localization.ILocalizationManager;
import aquality.selenium.core.utilities.ISettingsFile;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.remote.options.BaseOptions;

import java.io.File;
import java.io.IOException;
Expand All @@ -29,9 +28,9 @@ public DriverSettings(ISettingsFile settingsFile, PlatformName platformName) {
}

@Override
public Capabilities getCapabilities() {
public BaseOptions<?> getCapabilities() {
Map<String, Object> capabilitiesFromSettings = getCapabilitiesFromSettings();
DesiredCapabilities capabilities = new DesiredCapabilities();
BaseOptions<?> capabilities = new BaseOptions<>();
capabilitiesFromSettings.forEach((key, value) -> {
if (key.toLowerCase().endsWith("options")) {
value = settingsFile.getMap(getDriverSettingsPath(CAPABILITIES, key));
Expand Down Expand Up @@ -68,7 +67,7 @@ private boolean hasApplicationPath() {
return settingsFile.getMap(getDriverSettingsPath()).containsKey(APPLICATION_PATH_KEY) || getDeviceCapabilities().is(APP_CAPABILITY_KEY);
}

private Capabilities getDeviceCapabilities() {
private BaseOptions<?> getDeviceCapabilities() {
String deviceKey = (String) settingsFile.getValueOrDefault(getDriverSettingsPath(DEVICE_KEY_KEY), null);
IDeviceSettings deviceSettings = new DeviceSettings(deviceKey);
return deviceSettings.getCapabilities();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package aquality.appium.mobile.configuration;

import org.openqa.selenium.Capabilities;
import io.appium.java_client.remote.options.BaseOptions;

/**
* Describes desired device settings.
Expand All @@ -9,7 +9,7 @@ public interface IDeviceSettings {

/**
* Capabilities related to desired device.
* @return initialized {@link Capabilities}.
* @return initialized {@link BaseOptions}.
*/
Capabilities getCapabilities();
BaseOptions<?> getCapabilities();
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package aquality.appium.mobile.configuration;

import org.openqa.selenium.Capabilities;
import io.appium.java_client.remote.options.BaseOptions;

/**
* Describes AppiumDriver settings.
Expand All @@ -9,9 +9,9 @@ public interface IDriverSettings {

/**
* Gets appium driver capabilities.
* @return initialized {@link Capabilities}.
* @return initialized {@link BaseOptions}.
*/
Capabilities getCapabilities();
BaseOptions<?> getCapabilities();

/**
* Provides a path to the application.
Expand Down
Loading