diff --git a/build.gradle b/build.gradle index 5304c65c4..c01d2c328 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,7 @@ dependencyCheck { } jacoco { - toolVersion = '0.8.12' + toolVersion = '0.8.13' } tasks.withType(JacocoReport).configureEach { @@ -91,7 +91,7 @@ jacocoTestReport.dependsOn test apply plugin: 'checkstyle' checkstyle { - toolVersion = '10.17.0' + toolVersion = '10.23.1' configFile = configDirectory.file('appium-style.xml').get().getAsFile() showViolations = true ignoreFailures = false @@ -180,7 +180,7 @@ signing { } wrapper { - gradleVersion = '8.9' + gradleVersion = '8.14' distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c3521197..1b33c55ba 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew index f5feea6d6..23d15a936 100755 --- a/gradlew +++ b/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9b42019c7..5eed7ee84 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/e2eAndroidTest/java/io/appium/java_client/service/local/ServerBuilderTest.java b/src/e2eAndroidTest/java/io/appium/java_client/service/local/ServerBuilderTest.java index d482284b2..bf1df1fe3 100644 --- a/src/e2eAndroidTest/java/io/appium/java_client/service/local/ServerBuilderTest.java +++ b/src/e2eAndroidTest/java/io/appium/java_client/service/local/ServerBuilderTest.java @@ -50,7 +50,7 @@ class ServerBuilderTest { private static final String PATH_TO_APPIUM_NODE_IN_PROPERTIES = getProperty(APPIUM_PATH); /** - * This is the path to the stub main.js file + * This is the path to the stub main.js file. */ private static final Path PATH_T0_TEST_MAIN_JS = TestUtils.resourcePathToAbsolutePath("main.js"); diff --git a/src/main/java/io/appium/java_client/AppiumBy.java b/src/main/java/io/appium/java_client/AppiumBy.java index aca01fea7..4314dc891 100644 --- a/src/main/java/io/appium/java_client/AppiumBy.java +++ b/src/main/java/io/appium/java_client/AppiumBy.java @@ -84,10 +84,10 @@ public static By androidDataMatcher(final String dataMatcherString) { } /** - * Refer to https://developer.android.com/training/testing/ui-automator + * Refer to UI Automator . * * @param uiautomatorText is Android UIAutomator string - * @return an instance of {@link AppiumBy.ByAndroidUIAutomator} + * @return an instance of {@link ByAndroidUIAutomator} */ public static By androidUIAutomator(final String uiautomatorText) { return new ByAndroidUIAutomator(uiautomatorText); @@ -169,9 +169,9 @@ public static By custom(final String selector) { * as for OpenCV library. * @return an instance of {@link ByImage} * @see - * The documentation on Image Comparison Features + * The documentation on Image Comparison Features * @see - * The settings available for lookup fine-tuning + * The settings available for lookup fine-tuning * @since Appium 1.8.2 */ public static By image(final String b64Template) { diff --git a/src/main/java/io/appium/java_client/android/nativekey/KeyEventMetaModifier.java b/src/main/java/io/appium/java_client/android/nativekey/KeyEventMetaModifier.java index e4f998b99..b32de52bc 100644 --- a/src/main/java/io/appium/java_client/android/nativekey/KeyEventMetaModifier.java +++ b/src/main/java/io/appium/java_client/android/nativekey/KeyEventMetaModifier.java @@ -23,103 +23,103 @@ public enum KeyEventMetaModifier { */ SELECTING(0x800), /** - *

This mask is used to check whether one of the ALT meta keys is pressed.

+ * This mask is used to check whether one of the ALT meta keys is pressed. * * @see AndroidKey#ALT_LEFT * @see AndroidKey#ALT_RIGHT */ ALT_ON(0x02), /** - *

This mask is used to check whether the left ALT meta key is pressed.

+ * This mask is used to check whether the left ALT meta key is pressed. * * @see AndroidKey#ALT_LEFT */ ALT_LEFT_ON(0x10), /** - *

This mask is used to check whether the right the ALT meta key is pressed.

+ * This mask is used to check whether the right the ALT meta key is pressed. * * @see AndroidKey#ALT_RIGHT */ ALT_RIGHT_ON(0x20), /** - *

This mask is used to check whether one of the SHIFT meta keys is pressed.

+ * This mask is used to check whether one of the SHIFT meta keys is pressed. * * @see AndroidKey#SHIFT_LEFT * @see AndroidKey#SHIFT_RIGHT */ SHIFT_ON(0x1), /** - *

This mask is used to check whether the left SHIFT meta key is pressed.

+ * This mask is used to check whether the left SHIFT meta key is pressed. * * @see AndroidKey#SHIFT_LEFT */ SHIFT_LEFT_ON(0x40), /** - *

This mask is used to check whether the right SHIFT meta key is pressed.

+ * This mask is used to check whether the right SHIFT meta key is pressed. * * @see AndroidKey#SHIFT_RIGHT */ SHIFT_RIGHT_ON(0x80), /** - *

This mask is used to check whether the SYM meta key is pressed.

+ * This mask is used to check whether the SYM meta key is pressed. */ SYM_ON(0x4), /** - *

This mask is used to check whether the FUNCTION meta key is pressed.

+ * This mask is used to check whether the FUNCTION meta key is pressed. */ FUNCTION_ON(0x8), /** - *

This mask is used to check whether one of the CTRL meta keys is pressed.

+ * This mask is used to check whether one of the CTRL meta keys is pressed. * * @see AndroidKey#CTRL_LEFT * @see AndroidKey#CTRL_RIGHT */ CTRL_ON(0x1000), /** - *

This mask is used to check whether the left CTRL meta key is pressed.

+ * This mask is used to check whether the left CTRL meta key is pressed. * * @see AndroidKey#CTRL_LEFT */ CTRL_LEFT_ON(0x2000), /** - *

This mask is used to check whether the right CTRL meta key is pressed.

+ * This mask is used to check whether the right CTRL meta key is pressed. * * @see AndroidKey#CTRL_RIGHT */ CTRL_RIGHT_ON(0x4000), /** - *

This mask is used to check whether one of the META meta keys is pressed.

+ * This mask is used to check whether one of the META meta keys is pressed. * * @see AndroidKey#META_LEFT * @see AndroidKey#META_RIGHT */ META_ON(0x10000), /** - *

This mask is used to check whether the left META meta key is pressed.

+ * This mask is used to check whether the left META meta key is pressed. * * @see AndroidKey#META_LEFT */ META_LEFT_ON(0x20000), /** - *

This mask is used to check whether the right META meta key is pressed.

+ * This mask is used to check whether the right META meta key is pressed. * * @see AndroidKey#META_RIGHT */ META_RIGHT_ON(0x40000), /** - *

This mask is used to check whether the CAPS LOCK meta key is on.

+ * This mask is used to check whether the CAPS LOCK meta key is on. * * @see AndroidKey#CAPS_LOCK */ CAPS_LOCK_ON(0x100000), /** - *

This mask is used to check whether the NUM LOCK meta key is on.

+ * This mask is used to check whether the NUM LOCK meta key is on. * * @see AndroidKey#NUM_LOCK */ NUM_LOCK_ON(0x200000), /** - *

This mask is used to check whether the SCROLL LOCK meta key is on.

+ * This mask is used to check whether the SCROLL LOCK meta key is on. * * @see AndroidKey#SCROLL_LOCK */ diff --git a/src/main/java/io/appium/java_client/android/options/EspressoOptions.java b/src/main/java/io/appium/java_client/android/options/EspressoOptions.java index 8cbe2cf33..da14a620e 100644 --- a/src/main/java/io/appium/java_client/android/options/EspressoOptions.java +++ b/src/main/java/io/appium/java_client/android/options/EspressoOptions.java @@ -101,7 +101,10 @@ import java.util.Map; /** - * https://github.com/appium/appium-espresso-driver#capabilities + * Provides options specific to the Espresso Driver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class EspressoOptions extends BaseOptions implements // General options: https://github.com/appium/appium-uiautomator2-driver#general diff --git a/src/main/java/io/appium/java_client/android/options/UiAutomator2Options.java b/src/main/java/io/appium/java_client/android/options/UiAutomator2Options.java index 3c6a7bc51..77115496f 100644 --- a/src/main/java/io/appium/java_client/android/options/UiAutomator2Options.java +++ b/src/main/java/io/appium/java_client/android/options/UiAutomator2Options.java @@ -107,7 +107,10 @@ import java.util.Map; /** - * https://github.com/appium/appium-uiautomator2-driver#capabilities + * Provides options specific to the UiAutomator2 Driver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class UiAutomator2Options extends BaseOptions implements // General options: https://github.com/appium/appium-uiautomator2-driver#general diff --git a/src/main/java/io/appium/java_client/chromium/ChromiumDriver.java b/src/main/java/io/appium/java_client/chromium/ChromiumDriver.java index e6366f708..d7e34242e 100644 --- a/src/main/java/io/appium/java_client/chromium/ChromiumDriver.java +++ b/src/main/java/io/appium/java_client/chromium/ChromiumDriver.java @@ -29,10 +29,11 @@ import java.net.URL; /** - *

ChromiumDriver is an officially supported Appium driver created to automate Mobile browsers + * ChromiumDriver is an officially supported Appium driver created to automate Mobile browsers * and web views based on the Chromium engine. The driver uses W3CWebDriver protocol and is built - * on top of chromium driver server.

+ * on top of chromium driver server. *
+ * *

Read appium-chromium-driver * for more details on how to configure and use it.

*/ diff --git a/src/main/java/io/appium/java_client/chromium/options/ChromiumOptions.java b/src/main/java/io/appium/java_client/chromium/options/ChromiumOptions.java index dfc5d7d02..2f25eeff4 100644 --- a/src/main/java/io/appium/java_client/chromium/options/ChromiumOptions.java +++ b/src/main/java/io/appium/java_client/chromium/options/ChromiumOptions.java @@ -24,7 +24,7 @@ import java.util.Map; /** - *

Options class that sets options for Chromium when testing websites.

+ * Options class that sets options for Chromium when testing websites. *
* @see appium-chromium-driver usage section */ diff --git a/src/main/java/io/appium/java_client/flutter/FlutterDriverOptions.java b/src/main/java/io/appium/java_client/flutter/FlutterDriverOptions.java index 6a00c0510..2e5a83430 100644 --- a/src/main/java/io/appium/java_client/flutter/FlutterDriverOptions.java +++ b/src/main/java/io/appium/java_client/flutter/FlutterDriverOptions.java @@ -13,7 +13,10 @@ import java.util.Map; /** - * https://github.com/AppiumTestDistribution/appium-flutter-integration-driver#capabilities-for-appium-flutter-integration-driver + * Provides options specific to the Appium Flutter Integration Driver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class FlutterDriverOptions extends BaseOptions implements SupportsFlutterSystemPortOption, diff --git a/src/main/java/io/appium/java_client/flutter/FlutterIntegrationTestDriver.java b/src/main/java/io/appium/java_client/flutter/FlutterIntegrationTestDriver.java index 4eb74e82a..1d11378e2 100644 --- a/src/main/java/io/appium/java_client/flutter/FlutterIntegrationTestDriver.java +++ b/src/main/java/io/appium/java_client/flutter/FlutterIntegrationTestDriver.java @@ -7,8 +7,8 @@ * Flutter applications, extending WebDriver and providing additional capabilities for * interacting with Flutter-specific elements and behaviors. * - *

This interface serves as a common entity for drivers that support Flutter applications - * on different platforms, such as Android and iOS.

+ *

This interface serves as a common entity for drivers that support Flutter applications + * on different platforms, such as Android and iOS.

* * @see WebDriver * @see SupportsGestureOnFlutterElements diff --git a/src/main/java/io/appium/java_client/gecko/options/GeckoOptions.java b/src/main/java/io/appium/java_client/gecko/options/GeckoOptions.java index 084400142..2e1b4f1fd 100644 --- a/src/main/java/io/appium/java_client/gecko/options/GeckoOptions.java +++ b/src/main/java/io/appium/java_client/gecko/options/GeckoOptions.java @@ -31,7 +31,10 @@ import java.util.Map; /** - * https://github.com/appium/appium-geckodriver#usage + * Provides options specific to the Geckodriver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class GeckoOptions extends BaseOptions implements SupportsBrowserNameOption, diff --git a/src/main/java/io/appium/java_client/ios/options/XCUITestOptions.java b/src/main/java/io/appium/java_client/ios/options/XCUITestOptions.java index 53465b4dd..081099bc7 100644 --- a/src/main/java/io/appium/java_client/ios/options/XCUITestOptions.java +++ b/src/main/java/io/appium/java_client/ios/options/XCUITestOptions.java @@ -119,7 +119,10 @@ import java.util.Map; /** - * https://github.com/appium/appium-xcuitest-driver#capabilities + * Provides options specific to the XCUITest Driver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class XCUITestOptions extends BaseOptions implements // General options: https://github.com/appium/appium-xcuitest-driver#general diff --git a/src/main/java/io/appium/java_client/mac/options/Mac2Options.java b/src/main/java/io/appium/java_client/mac/options/Mac2Options.java index 5325ee284..230c04c90 100644 --- a/src/main/java/io/appium/java_client/mac/options/Mac2Options.java +++ b/src/main/java/io/appium/java_client/mac/options/Mac2Options.java @@ -27,7 +27,10 @@ import java.util.Optional; /** - * https://github.com/appium/appium-mac2-driver#capabilities + * Provides options specific to the Appium Mac2 Driver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class Mac2Options extends BaseOptions implements SupportsSystemPortOption, diff --git a/src/main/java/io/appium/java_client/safari/options/SafariOptions.java b/src/main/java/io/appium/java_client/safari/options/SafariOptions.java index fa170587b..9639509a1 100644 --- a/src/main/java/io/appium/java_client/safari/options/SafariOptions.java +++ b/src/main/java/io/appium/java_client/safari/options/SafariOptions.java @@ -31,7 +31,10 @@ import java.util.Map; /** - * https://github.com/appium/appium-safari-driver#usage + * Provides options specific to the Safari Driver. + * + *

For more details, refer to the + * capabilities documentation

*/ public class SafariOptions extends BaseOptions implements SupportsBrowserNameOption, diff --git a/src/main/java/io/appium/java_client/windows/options/WindowsOptions.java b/src/main/java/io/appium/java_client/windows/options/WindowsOptions.java index fd4d125b0..257c2807a 100644 --- a/src/main/java/io/appium/java_client/windows/options/WindowsOptions.java +++ b/src/main/java/io/appium/java_client/windows/options/WindowsOptions.java @@ -28,7 +28,7 @@ import java.util.Optional; /** - * https://github.com/appium/appium-windows-driver#usage + * https://github.com/appium/appium-windows-driver#usage. */ public class WindowsOptions extends BaseOptions implements SupportsAppOption,