• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

appium/java-client: Java language binding for writing Appium Tests, conforms to ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

appium/java-client

开源软件地址(OpenSource Url):

https://github.com/appium/java-client

开源编程语言(OpenSource Language):

Java 95.1%

开源软件介绍(OpenSource Introduction):

java-client

Maven Central Javadocs Build Status

This is the Java language binding for writing Appium Tests, conforms to Mobile JSON Wire Protocol

API docs

Features and other interesting information

Tech stack

How to install the project

WIKI

v8 Migration

Since version 8 Appium Java Client had several major changes, which might require to update your client code. Make sure to follow the v7 to v8 Migration Guide in order to streamline the migration process.

How to install latest java client Beta/Snapshots

Java client project is available to use even before it is officially published to maven central. Refer jitpack.io

Maven

  • Add the following to pom.xml:
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
  • Add the dependency:
<dependency>
    <groupId>com.github.appium</groupId>
    <artifactId>java-client</artifactId>
    <version>latest commit ID from master branch</version>
</dependency>

Gradle

  • Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  • Add the dependency:
dependencies {
    implementation 'com.github.appium:java-client:latest commit id from master branch'
}

Changelog

8.2.0

  • [ENHANCEMENTS]
    • AppiumDriverLocalService can handle outputStreams. #1709
    • Add creating a driver with ClientConfig. #1735
  • [BUG FIX]
    • Update the environment argument type for mac SupportsEnvironmentOption. #1712
  • [REFRACTOR]
    • Deprecate Appium ByAll in favour of Selenium ByAll. #1740
    • Bump Node.js version in pipeline. #1713
    • Switch unit tests to run on Junit 5 Jupiter Platform. #1721
    • Clean up unit tests asserting thrown exceptions. #1741
    • Fix open notification test. #1749
    • update Azure pipeline to use macos-11 VM image. #1728
  • [DEPENDENCY UPDATES]
    • org.seleniumhq.selenium:selenium-java was updated to 4.4.0.
    • org.owasp.dependencycheck was updated to 7.1.2.
    • io.github.bonigarcia:webdrivermanager was updated to 5.3.0.
    • gradle was updated to 7.5.1.
    • com.google.code.gson:gson was updated to 2.9.1.

8.1.1

  • [BUG FIX]
    • Perform safe typecast while getting the platform name. #1702
    • Add prefix to platformVersion capability name. #1704
  • [REFRACTOR]
    • Update e2e tests to make it green. #1706
    • Ignore the test which has a connected server issue. #1699

8.1.0

  • [ENHANCEMENTS]
    • Add new EspressoBuildConfig options. #1687
  • [DOCUMENTATION]
    • delete all references to removed MobileElement class. #1677
  • [BUG FIX]
    • Pass orientation name capability in uppercase. #1686
    • correction for ping method to get proper status URL. #1661
    • Remove deprecated option classes. #1679
    • Remove obsolete event firing decorators. #1676
  • [DEPENDENCY UPDATES]
    • org.seleniumhq.selenium:selenium-java was updated to 4.2.0.
    • org.owasp.dependencycheck was updated to 7.1.0.1.
    • org.springframework:spring-context was removed. #1676
    • org.aspectj:aspectjweaver was updated to 1.9.9.
    • io.github.bonigarcia:webdrivermanager was updated to 5.2.0.
    • org.projectlombok:lombok was updated to 1.18.24.

8.0.0

  • [DOCUMENTATION]
    • Set minimum Java version to 1.8.0. #1631
  • [BUG FIX]
    • Make interfaces public to fix decorator creation. #1644
    • Do not convert argument names to lowercase. #1627
    • Avoid fallback to css for id and name locator annotations. #1622
    • Fix handling of chinese characters in AppiumDriverLocalService. #1618
  • [DEPENDENCY UPDATES]
    • org.owasp.dependencycheck was updated to 7.0.0.
    • org.springframework:spring-context was updated to 5.3.16.
    • actions/setup-java was updated to 3.
    • actions/checkout was updated to 3.
    • io.github.bonigarcia:webdrivermanager was updated to 5.1.0.
    • org.aspectj:aspectjweaver was updated to 1.9.8.
    • org.slf4j:slf4j-api was updated to 1.7.36.
    • com.github.johnrengelman.shadow was updated to 7.1.2.

8.0.0-beta2

  • [DOCUMENTATION]
    • Add a link to options builder examples to the migration guide. #1595
  • [BUG FIX]
    • Filter out proxyClassLookup method from Proxy class (for Java 16+) in AppiumByBuilder. #1575
  • [REFRACTOR]
    • Add more nice functional stuff into page factory helpers. #1584
    • Switch e2e tests to use Appium2. #1603
    • relax constraints of Selenium dependencies versions. #1606
  • [DEPENDENCY UPDATES]
    • Upgrade to Selenium 4.1.1. #1613
    • org.owasp.dependencycheck was updated to 6.5.1.
    • org.springframework:spring-context was updated to 5.3.14.
    • actions/setup-java was updated to 2.4.0.
    • gradle was updated to 7.3.

8.0.0-beta

  • [ENHANCEMENTS]
    • Start adding UiAutomator2 options. #1543
    • Add more UiAutomator2 options. #1545
    • Finish creating options for UiAutomator2 driver. #1548
    • Add WDA-related XCUITestOptions. #1552
    • Add web view options for XCUITest driver. #1557
    • Add the rest of XCUITest driver options. #1561
    • Add Espresso options. #1563
    • Add Windows driver options. #1564
    • Add Mac2 driver options. #1565
    • Add Gecko driver options. #1573
    • Add Safari driver options. #1576
    • Start adding XCUITest driver options. #1551
    • Implement driver-specific W3C option classes. #1540
    • Update Service to properly work with options. #1550
  • [BREAKING CHANGE]
    • Migrate to Selenium 4. #1531
    • Make sure we only write W3C payload into create session command. #1537
    • Use the new session payload creator inherited from Selenium. #1535
    • unify locator factories naming and toString implementations. #1538
    • drop support of deprecated Selendroid driver. #1553
    • switch to javac compiler. #1556
    • revise used Selenium dependencies. #1560
    • change prefix to AppiumBy in locator toString implementation. #1559
    • enable dependencies caching. #1567
    • Include more tests into the pipeline. #1566
    • Tune setting of default platform names. #1570
    • Deprecate custom event listener implementation and default to the one provided by Selenium4. #1541
    • Deprecate touch actions. #1569
    • Deprecate legacy app management helpers. #1571
    • deprecate Windows UIAutomation selector. #1562
    • Remove unused entities. #1572
    • Remove setElementValue helper. #1577
    • Remove selenium package override. #1555
    • remove redundant exclusion of Gradle task signMavenJavaPublication. #1568
  • [DEPENDENCY UPDATES]
    • org.owasp.dependencycheck was updated to 6.4.1.
    • com.google.code.gson:gson was updated to 2.8.9.

7.6.0

  • [ENHANCEMENTS]
    • Add custom commands dynamically [Appium 2.0]. #1506
    • New General Server flags are added [Appium 2.0]. #1511
    • Add support of extended Android geolocation. #1492
  • [BUG FIX]
    • AndroidGeoLocation: update the constructor signature to mimic order of parameters in org.openqa.selenium.html5.Location. #1526
    • Prevent duplicate builds for PRs from base repo branches. #1496
    • Enable Dependabot for GitHub actions. #1500
    • bind mac2element in element map for mac platform. #1474
  • [DEPENDENCY UPDATES]
    • org.owasp.dependencycheck was updated to 6.3.2.
    • org.projectlombok:lombok was updated to 1.18.22.
    • com.github.johnrengelman.shadow was updated to 7.1.0.
    • actions/setup-java was updated to 2.3.1.
    • io.github.bonigarcia:webdrivermanager was updated to 5.0.3.
    • org.springframework:spring-context was updated to 5.3.10.
    • org.slf4j:slf4j-api was updated to 1.7.32.
    • com.google.code.gson:gson was updated to 2.8.8.
    • gradle was updated to 7.1.1.
    • commons-io:commons-io was updated to 2.11.0.
    • org.aspectj:aspectjweaver was updated to 1.9.7.
    • org.eclipse.jdt:ecj was updated to 3.26.0.
    • 'junit:junit was updated to 4.13.2.

7.5.1

  • [ENHANCEMENTS]
    • Add iOS related annotations to tvOS. #1456
  • [BUG FIX]
    • Bring back automatic quote escaping for desired capabilities command line arguments on windows. #1454
  • [DEPENDENCY UPDATES]
    • org.owasp.dependencycheck was updated to 6.1.2.
    • org.eclipse.jdt:ecj was updated to 3.25.0.

7.5.0

  • [ENHANCEMENTS]
    • Add support for Appium Mac2Driver. #1439
    • Add support for multiple image occurrences. #1445
    • BOUND_ELEMENTS_BY_INDEX Setting was added. #1418
  • [BUG FIX]
    • Use lower case for Windows platform key in ElementMap. #1421
  • [DEPENDENCY UPDATES]
    • org.apache.commons:commons-lang3 was updated to 3.12.0.
    • org.springframework:spring-context was updated to 5.3.4.
    • org.owasp.dependencycheck was updated to 6.1.0.
    • io.github.bonigarcia:webdrivermanager was updated to 4.3.1.
    • org.eclipse.jdt:ecj was updated to 3.24.0.
    • org.projectlombok:lombok was updated to 1.18.16.
    • jcenter repository was removed.

7.4.1

  • [BUG FIX]
    • Fix the configuration of selenium-java dependency. #1417
  • [DEPENDENCY UPDATES]
    • gradle was updated to 6.7.1.

7.4.0

  • [ENHANCEMENTS]
    • Add ability to set multiple settings. #1409
    • Support to execute Chrome DevTools Protocol commands against Android Chrome browser session. #1375
    • Add new upload options i.e withHeaders, withFormFields and withFileFieldName. #1342
    • Add AndroidOptions and iOSOptions. #1331
    • Add idempotency key to session creation requests. #1327
    • Add support for Android capability types: buildToolsVersion, enforceAppInstall, ensureWebviewsHavePages, webviewDevtoolsPort, and remoteAppsCacheLimit. #1326
    • Added OTHER_APPS and PRINT_PAGE_SOURCE_ON_FIND_FAILURE Mobile Capability Types. #1323
    • Make settings available for all AppiumDriver instances. #1318
    • Add wrappers for the Windows screen recorder. #1313
    • Add GitHub Action validating Gradle wrapper. #1296
    • Add support for Android viewmatcher. #1293
    • Update web view detection algorithm for iOS tests. #1294
    • Add allow-insecure and deny-insecure server flags. #1282
  • [BUG FIX]
    • Fix jitpack build failures. #1389
    • Fix parse platformName if it is passed as enum item. #1369
    • Increase the timeout for graceful AppiumDriverLocalService termination. #1354
    • Avoid casting to RemoteWebElement in ElementOptions. #1345
    • Properly translate desiredCapabilities into a command line argument. #1337
    • Change getDeviceTime to call the mobile implementation. #1332
    • Remove appiumVersion from MobileCapabilityType. #1325
    • Set appropriate fluent wait timeouts. #1316
  • [DOCUMENTATION UPDATES]
    • Update Appium Environment Troubleshooting. #1358
    • Address warnings printed by docs linter. #1355
    • Add java docs for various Mobile Options. #1331
    • Add AndroidFindBy, iOSXCUITFindBy and WindowsFindBy docs. #1311
    • Renamed maim.js to main.js. #1277
    • Improve Readability of Issue Template. #1260

7.3.0

  • [ENHANCEMENTS]
    • Add support for logging custom events on the Appium Server. #1262
    • Update Appium executable detection implementation. #1256
    • Avoid through NPE if any setting value is null. #1241
    • Settings API was improved to accept string names. #1240
    • Switch runAppInBackground iOS implementation in sync with other platforms. #1229
    • JavaDocs for AndroidMobileCapabilityType was updated. #1238
    • Github Actions were introduced instead of TravisCI. #1219
  • [BUG FIX]
    • Fix return type of getSystemBars API. #1216
    • Avoid using getSession call for capabilities values retrieval [W3C Support]. #1204
    • Fix pagefactory list element initialisation when parameterised by generic type. #1237
    • Fix AndroidKey commands. #1250

7.2.0

  • [DEPENDENCY UPDATES]
    • org.seleniumhq.selenium:selenium-java was reverted to stable version 3.141.59. #1209
    • org.projectlombok:lombok:1.18.8 was introduced. #1193
  • [ENHANCEMENTS]
    • videoFilters property was added to IOSStartScreenRecordingOptions. #1180
  • [IMPROVEMENTS]
    • Selendroid automationName was deprecated. #1198
    • JavaDocs for AndroidMobileCapabilityType and IOSMobileCapabilityType were updated. #1204
    • JitPack builds were fixed. #1203

7.1.0

  • [ENHANCEMENTS]

    • Added an ability to get all the session details. #1167
    • TRACK_SCROLL_EVENTS, ALLOW_INVISIBLE_ELEMENTS, ENABLE_NOTIFICATION_LISTENER, NORMALIZE_TAG_NAMES and SHUTDOWN_ON_POWER_DISCONNECT Android Settings were added.
    • KEYBOARD_AUTOCORRECTION, MJPEG_SCALING_FACTOR, MJPEG_SERVER_SCREENSHOT_QUALITY, MJPEG_SERVER_FRAMERATE, SCREENSHOT_QUALITY and KEYBOARD_PREDICTION iOS Settings were added.
    • GET_MATCHED_IMAGE_RESULT, FIX_IMAGE_TEMPLATE_SCALE, SHOULD_USE_COMPACT_RESPONSES, ELEMENT_RESPONSE_ATTRIBUTES and DEFAULT_IMAGE_TEMPLATE_SCALE settings were added for both Android and iOS #1166, #1156 and #1120
    • The new interface io.appium.java_client.ExecutesDriverScript was added. #1165
    • Added an ability to get status of appium server. #1153
    • tvOS platform support was added. #1142
    • The new interface io.appium.java_client. FindsByAndroidDataMatcher was added. #1106
    • The selector strategy io.appium.java_client.MobileBy.ByAndroidDataMatcher was added. #1106
    • Selendroid for android and UIAutomation for iOS are removed. #1077
    • [BUG FIX] Platform Name enforced on driver creation is avoided now. #1164
    • [BUG FIX] Send both signalStrengh and signalStrength for GSM_SIGNAL. #1115
    • [BUG FIX] Null pointer exceptions when calling getCapabilities is handled better. #1094
  • [DEPENDENCY UPDATES]

    • org.seleniumhq.selenium:selenium-java was updated to 4.0.0-alpha-1.
    • org.aspectj:aspectjweaver was updated to 1.9.4.
    • org.apache.httpcomponents:httpclient was updated to 4.5.9.
    • cglib:cglib was updated to 3.2.12.
    • org.springframework:spring-context was updated to 5.1.8.RELEASE.
    • io.github.bonigarcia:webdrivermanager was updated to 3.6.1.
    • org.eclipse.jdt:ecj was updated to 3.18.0.
    • com.github.jengelman.gradle.plugins:shadow was updated to 5.1.0.
    • checkstyle was updated to 8.22.
    • gradle was updated to 5.4.
    • dependency-check-gradle was updated to 5.1.0.
    • org.slf4j:slf4j-api was updated to 1.7.26.
    • org.apache.commons:commons-lang3 was updated to 3.9.

7.0.0

  • [ENHANCEMENTS]
    • The new interface io.appium.java_client.FindsByAndroidViewTag was added. #996
    • The selector strategy io.appium.java_client.MobileBy.ByAndroidViewTag was added. #996
    • The new interface io.appium.java_client.FindsByImage was added. #990
    • The selector strategy io.appium.java_client.MobileBy.ByImage was added. #990
    • The new interface io.appium.java_client.FindsByCustom was added. #1041
    • The selector strategy io.appium.java_client.MobileBy.ByCustom was added. #1041
    • DatatypeConverter is replaced with Base64 for JDK 9 compatibility. #999
    • Expand touch options API to accept coordinates as Point. #997
    • W3C capabilities written into firstMatch entity instead of alwaysMatch. #1010
    • Selendroid for android and UIAutomation for iOS is deprecated. #1034 and #1074
    • videoScale and fps screen recording options are introduced for iOS. #1067
    • NORMALIZE_TAG_NAMES setting was introduced for android. #1073
    • threshold argument was added to OccurrenceMatchingOptions. #1060
    • org.openqa.selenium.internal.WrapsElement replaced by org.openqa.selenium.WrapsElement. #1053
    • SLF4J logging support added into Appium Driver local service. #1014
    • IMAGE_MATCH_THRESHOLD, FIX_IMAGE_FIND_SCREENSHOT_DIMENSIONS, FIX_IMAGE_TEMPLATE_SIZE, CHECK_IMAGE_ELEMENT_STALENESS, UPDATE_IMAGE_ELEMENT_POSITION and IMAGE_ELEMENT_TAP_STRATEGY setting was introduced for image elements. #1011
  • [BUG FIX] Better handling of InvocationTargetException #968
  • [BUG FIX] Map sending keys to active element for W3C compatibility. #966
  • [BUG FIX] Error message on session creation is improved. #994
  • [DEPENDENCY UPDATES]
    • org.seleniumhq.selenium:selenium-java was updated to 3.141.59.
    • com.google.code.gson:gson was updated to 2.8.5.
    • org.apache.httpcomponents:httpclient was updated to 4.5.6.
    • cglib:cglib was updated to 3.2.8.
    • org.apache.commons:commons-lang3 was updated to 3.8.
    • org.springframework:spring-context was updated to 5.1.0.RELEASE.
    • io.github.bonigarcia:webdrivermanager was updated to 3.0.0.
    • org.eclipse.jdt:ecj was updated to 3.14.0.
    • org.slf4j:slf4j-api was updated to 1.7.25.
    • jacoco was updated to 0.8.2.
    • checkstyle was updated to 8.12.
    • gradle was updated to 4.10.1.
    • org.openpnp:opencv was removed.

6.1.0

  • [BUG FIX] Initing web socket clients lazily. Report #911. FIX: #912.
  • [BUG FIX] Fix session payload for W3C. #913
  • [ENHANCEMENT] Added TouchAction constructor argument verification #923
  • [BUG FIX] Set retry flag to true by default for OkHttpFactory. #928
  • [BUG FIX] Fix class cast exception on getting battery info. #935
  • [ENHANCEMENT] Added an optional format argument to getDeviceTime and update the documentation. #939
  • [ENHANCEMENT] The switching web socket client implementation to okhttp library. #941
  • [BUG FIX] Fix of the bug #924. #951

6.0.0

  • [ENHANCEMENT] Added an ability to set pressure value for iOS. #879
  • [ENHANCEMENT] Added new server arguments RELAXED_SECURITY and ENABLE_HEAP_DUMP. #880
  • [BUG FIX] Use default Selenium HTTP client factory #877
  • [ENHANCEMENT] Supporting syslog broadcast with iOS #871
  • [ENHANCEMENT] Added isKeyboardShown command for iOS #887
  • [ENHANCEMENT] Added battery information accessors #882
  • [BREAKING CHANGE] Removal of deprecated code. #881
  • [BUG FIX] Added NewAppiumSessionPayload. Bug report: #875. FIX: #894
  • [ENHANCEMENT] Added ESPRESSO automation name #908
  • [ENHANCEMENT] Added a method for output streams cleanup #909
  • [DEPENDENCY UPDATES]
    • com.google.code.gson:gson was updated to 2.8.4
    • org.springframework:spring-context was updated to 5.0.5.RELEASE
    • org.aspectj:aspectjweaver was updated to 1.9.1
    • org.glassfish.tyrus:tyrus-clien was updated to 1.13.1
    • org.glassfish.tyrus:tyrus-container-grizzly was updated to 1.2.1
    • org.seleniumhq.selenium:selenium-java was updated to 3.12.0

6.0.0-BETA5

  • [ENHANCEMENT] Added clipboard handlers. #855 #869
  • [ENHANCEMENT] Added wrappers for Android logcat broadcaster. #858
  • [ENHANCEMENT] Add bugreport option to Android screen recorder. #852
  • [BUG FIX] Avoid amending parameters for SET_ALERT_VALUE endpoint. #867
  • [BREAKING CHANGE] Refactor network connection setting on Android. #865
  • [BUG FIX] [BREAKING CHANGE] Refactor of the io.appium.java_client.AppiumFluentWait. It uses java.time.Duration for time settings instead of org.openqa.selenium.support.ui.Duration and java.util.concurrent.TimeUnit #863
  • [BREAKING CHANGE] io.appium.java_client.pagefactory.TimeOutDuration became deprecated. It is going to be removed. Use java.time.Duration instead. FIX #742 #863.
  • [BREAKING CHANGE] io.appium.java_client.pagefactory.WithTimeOut#unit became deprecated. It is going to be removed. Use io.appium.java_client.pagefactory.WithTimeOut#chronoUnit instead. FIX #742 #863.
  • [BREAKING CHANGE] constructors of io.appium.java_client.pagefactory.AppiumElementLocatorFactory, io.appium.java_client.pagefactory.AppiumFieldDecorator and io.appium.java_client.pagefactory.AppiumElementLocator which use io.appium.java_client.pagefactory.TimeOutDuration as a parameter became deprecated. Use new constructors which use java.time.Duration.
  • [DEPENDENCY UPDATES]
    • org.seleniumhq.selenium:selenium-java was updated to 3.11.0

6.0.0-BETA4