From 3e98cc98f34bdaa9ede30546426cdf1370a4c1df Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sun, 10 Jan 2021 15:04:13 -0800 Subject: [PATCH] chore: merge master to 2.0 (#15007) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fix urls in docs (#14910) * docs: Update generated docs [ci skip] (#14913) Co-authored-by: runner * feat: Add Mac2Driver (#14911) * docs: Add Mac2Driver documentation (#14914) * chore: add scripts for doing releases (#14918) * docs: Update push-file.yml (#14920) * chore: fix a link in appium.io (#14929) * fix links * fix * docs: Update generated docs [ci skip] (#14930) Co-authored-by: runner * docs: removed deprecated method (#14934) assert.equal was deprecated — since v9.9.0 - use strictEqual() instead. * docs: add links to mac2 driver in caps and settings (#14942) * cods: add links to mac2 driver in caps and settings * tweak naming * chore: remove authorize-ios from package (#14946) * chore: add 1.19.1 in changelog (#14947) * feat: add --keep-alive-timeout CLI arg to adjust server keepalive and connection timeout * rename release-candidate.sh to release * chore: Switch to GitHub CI (#14978) * docs: changelog for Appium v1.20 (#14985) * docs: swap out hamcrest.org reference * docs: fix example comment (#14995) changed the app name in a comment for the notepad example from AlarmClock to Notepad * docs: update README with english tutorial version to learn Appium with Python (#14999) * update README * Update README.md * remove duplicated lib/parser.js * install fakedriver Co-authored-by: Appium Triager Co-authored-by: runner Co-authored-by: Mykola Mokhnach Co-authored-by: Dan Graham Co-authored-by: Ilija Boshkov Co-authored-by: runner Co-authored-by: roman-olshevskiy <56480723+roman-olshevskiy@users.noreply.github.com> Co-authored-by: Jonathan Lipps Co-authored-by: BoldAsLove Co-authored-by: Maria Clara dos Santos Bezerra --- .github/workflows/node.js.yml | 38 +++++++++ .travis.yml | 34 -------- CHANGELOG.md | 77 ++++++++++++++++++- ci-jobs/templates/bundle-template.yml | 7 -- .../cn/advanced-concepts/wda-custom-server.md | 3 - .../appium-from-source.md | 27 ------- docs/en/about-appium/getting-started.md | 4 +- docs/en/about-appium/platform-support.md | 2 +- .../migrating-to-xcuitest.md | 4 - docs/en/advanced-concepts/settings.md | 11 ++- .../en/advanced-concepts/wda-custom-server.md | 2 - docs/en/commands/device/files/push-file.md | 12 +-- .../appium-from-source.md | 23 ------ .../developers-overview.md | 2 +- .../contributing-to-appium/release-appium.md | 6 +- docs/en/drivers/ios-uiautomation.md | 29 +------ docs/en/drivers/ios-xcuitest.md | 6 -- docs/en/drivers/mac2.md | 1 - docs/en/drivers/windows.md | 2 +- .../android/espresso-datamatcher-selector.md | 2 +- docs/en/writing-running-appium/caps.md | 13 +++- docs/toc.js | 1 + package.json | 3 +- sample-code/python/README.md | 8 +- scripts/release-branch.sh | 2 +- 25 files changed, 159 insertions(+), 160 deletions(-) create mode 100644 .github/workflows/node.js.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 000000000..e18a60055 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,38 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm run clean + - run: node . driver install --source=npm appium-fake-driver + - run: npm run test + - run: npm run e2e-test + + generate_docs: + needs: [build] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - run: npm run clean + - run: npm run generate-docs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ab1e0c523..000000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: node_js -node_js: "10" -os: linux -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 - - build-essential -env: - global: - - CXX=g++-4.8 -cache: - npm: false -jobs: - include: - - stage: Tests - name: node 10 - before_script: - - npm outdated || true - - node . driver install --source=npm appium-fake-driver - script: npm run test && npm run e2e-test - after_script: npm run coverage - - stage: - name: node 12 - before_script: - - npm outdated || true - - node . driver install --source=npm appium-fake-driver - script: npm run test && npm run e2e-test - node_js: "12" - - stage: - name: test documentation generation - script: npm run generate-docs diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a94b2918..6ca5fde9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,78 @@ +CHANGES IN VERSION 1.20.0 (FROM 1.19.1) +=================================== + +Appium 1.20.0 is a minor release + +### General +* Does not destory sockets explicitly against a client [appium-base-driver#437](https://github.com/appium/appium-base-driver/pull/437) +* Connection timeout to each driver respects `--keep-alive-timeout` configuration [appium-base-driver#443](https://github.com/appium/appium-base-driver/pull/443). Default to 10 minutes + +### Android General +* `InvalidContextError` error is thrown if running instrumentation process was dead +* Fix Android emulator config paths on Windows [appium-adb#558](https://github.com/appium/appium-adb/pull/558) + +### Android(UIAutomator2) +* Appium adds `io.appium.settings`, `io.appium.uiautomator2.server` and `io.appium.uiautomator2.server.test` as the device's Doze whitelist to keep working [appium-uiautomator2-driver#420](https://github.com/appium/appium-uiautomator2-driver/pull/420) +* Add settings: + * `useResourcesForOrientationDetection` to use application resource propertires to determine the current device orientation [appium-uiautomator2-server#389](https://github.com/appium/appium-uiautomator2-server/pull/389) + +### Android(Espresso) +* Appium adds `io.appium.settings` and `io.appium.espressoserver.test` as the device's Doze whitelist to keep working [appium-espresso-driver#627](https://github.com/appium/appium-espresso-driver/pull/627) +* Add `mobile:` extensions: + * `uiautomatorPageSource` returns the page source dump by UIAutomator [appium-espresso-driver#628](https://github.com/appium/appium-espresso-driver/pull/628) +* Improves XPath lookup performance [appium-espresso-driver#637](https://github.com/appium/appium-espresso-driver/pull/637) + +### iOS General +* Fix updating simulator preference method [appium-ios-simulator#298](https://github.com/appium/appium-ios-simulator/pull/298) + +### iOS(XCUITest) +* Support M1 chip based Mac, Xcode 12.3 +* Snapshots caching logic has been rewritten to improve lookup performance e.g. [WebDriverAgent#404](https://github.com/appium/WebDriverAgent/pull/404), [WebDriverAgent#407](https://github.com/appium/WebDriverAgent/pull/407) +* Breaking changes + * Support over Xcode 10.2, iOS 12.2 (Drop supporting Xcode 10.0 and 10.1) + * `accessibility id`, `name` and `id` lookup strategies now find elements by `name`(`wdName`) attributes in page source: [WebDriverAgent#414](https://github.com/appium/WebDriverAgent/pull/414) + * Previously, they found elements by `name`(`wdName`) and `value`(`wdValue`) + * Please use `predicate` strategy to find `value`(`wdValue`) attribute like [this change](https://github.com/appium/ruby_lib_core/pull/282) +* Add capabilities: + * `resultBundlePath` and `resultBundleVersion` to allow to specify the path to the result bundle of WebDriverAgent xcodebuild [WebDriverAgent#410](https://github.com/appium/WebDriverAgent/pull/410) + * `safariIgnoreWebHostnames` to provide a list of hostnames that the Safari automation tools should ignore [appium-xcuitest-driver#1258](https://github.com/appium/appium-xcuitest-driver/pull/ + 1258) + * `waitForIdleTimeout` (Please read the below settings section) +* Add settings: (Please read [Settings API](http://appium.io/docs/en/advanced-concepts/settings/index.html) for more details) + * `customSnapshotTimeout` which was renamed from `snapshotTimeout` sets how much time is allowed to resolve a single accessibility snapshot with custom attributes + * `waitForIdleTimeout` to customize the time for waiting until the application under test is idling + * The value `zero` (not recommended) is equal to `waitForQuiescence` to `false` + * **Important**: this is still a workaround, so there is no guarantee it is going to always work. Please consider rather fixing your application source code, because XCTest uses idle intervals to send commands to the accessibility manager. You may get unexpected testing results or application crashes if such intervals don't exist or are too tiny. + * `animationCoolOffTimeout` customize the timeout to wait until the application under test has no animation +* Add a possibility to select elements by indexes [WebDriverAgent#417](https://github.com/appium/WebDriverAgent/pull/417) +* Fix parsing SSL output from OpenSSL output [appium-xcuitest-driver#1256](https://github.com/appium/appium-xcuitest-driver/pull/1256) + +### iOS(Safari) + +This driver provides you to communicate with Apple's `safaridriver` binary via Appium. +It only supports Safari browser automation on macOS and iOS (Simulator/Real Device). + +Read https://github.com/appium/appium-safari-driver for more details. + +### Mac2 + +This driver provides you to handle macOS native applications with Apple's `XCTest` framework. +Read https://github.com/appium/appium-mac2-driver for more details. + +### Gecko + +This driver provides you to communicate with Firefox browsers on macOS, Windows, Linux and Android with geckodriver binary via Appium. +Read https://github.com/appium/appium-geckodriver for more details to set the environment up. + +CHANGES IN VERSION 1.19.1(FROM 1.19.0) +=================================== + +Appium 1.19.1 is a patch release + +### iOS(XCUITest) + +Patches "missing target for targetId" bug in Safari tests (see [#14867](https://github.com/appium/appium/issues/14867)) + CHANGES IN VERSION 1.19.0 (FROM 1.18.3) =================================== @@ -58,7 +133,7 @@ Appium 1.19.0 is a minor release ### Flutter -The version is `0.0.25` +The version is `0.25` ### You.i Engine Driver diff --git a/ci-jobs/templates/bundle-template.yml b/ci-jobs/templates/bundle-template.yml index e4b8d42f1..7946287d9 100644 --- a/ci-jobs/templates/bundle-template.yml +++ b/ci-jobs/templates/bundle-template.yml @@ -14,13 +14,6 @@ jobs: versionSpec: '12.x' - script: npm ci || npm install # "npm ci" if shrinkwrap is present displayName: Install NPM Dependencies - - script: | - pushd node_modules/appium-webdriveragent - carthage bootstrap --no-use-binaries - cp Cartfile.resolved Carthage - mkdir -p ./Resources/WebDriverAgent.bundle - popd - displayName: Fully build XCUITestDriver - script: npm run build displayName: npm run build - script: npm prune --production diff --git a/docs/cn/advanced-concepts/wda-custom-server.md b/docs/cn/advanced-concepts/wda-custom-server.md index ebb06e39f..bc52be2b4 100644 --- a/docs/cn/advanced-concepts/wda-custom-server.md +++ b/docs/cn/advanced-concepts/wda-custom-server.md @@ -8,9 +8,6 @@ Appium 的 iOS 版本的后端用的是[Facebook's WebDriverAgent](https://githu ### 安装WDA -Appium 会自动下载 WebDriverAgent 源码。如果使用 npm 命令(`npm install -g appium`) 安装Appium的话,通常情况下会保存在/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent 目录下。 -如果是首次安装的话,还需要下载一些第三方依赖("carthage"工具就是为此准备的: `brew install carthage`): - ```bash cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent ./Scripts/bootstrap.sh -d diff --git a/docs/cn/contributing-to-appium/appium-from-source.md b/docs/cn/contributing-to-appium/appium-from-source.md index fa750486d..ebadc3a93 100644 --- a/docs/cn/contributing-to-appium/appium-from-source.md +++ b/docs/cn/contributing-to-appium/appium-from-source.md @@ -23,7 +23,6 @@ git clone https://github.com/appium/appium.git cd appium npm install npm run build -npm run authorize-ios # for ios only node . ``` ```center @@ -31,7 +30,6 @@ git clone https://github.com/appium/appium.git cd appium npm install npm run build # 需要gulp,往下看 -npm run authorize-ios # 仅iOS node . ``` @@ -74,31 +72,6 @@ node . 完整的参数列表,请参考[the server documentation](/docs/cn/writing-running-appium/server-args.md) - -#### Hacking with Appium for iOS - -#### 鼓捣 iOS 上的Appium - -为了避免启动iOS应用程序时可能出现的安全对话框,您必须通过以下两种方式之一修改 `/etc/authorization` 文件: - -1. 手动修改 `/etc/authorization` 文件中的 `system.privilege.taskport` 下的 ``的值为 ``。 -2. 运行以下命令,为您自动修改 `/etc/authorization` 文件: - - ```center - sudo npm run authorize-ios - ``` - - -此时,运行: - -```center -rm -rf node-modules -npm install -npm run build -``` - -现在你的 Appium 实例已经准备好了。运行 `node .` 以启动Appium服务器。 - #### 鼓捣 Android 上的Appium 通过运行以下命令配置Appium: diff --git a/docs/en/about-appium/getting-started.md b/docs/en/about-appium/getting-started.md index d85affba9..283375873 100644 --- a/docs/en/about-appium/getting-started.md +++ b/docs/en/about-appium/getting-started.md @@ -222,7 +222,7 @@ simply type into a text field and check that the correct text was entered: const field = await client.$("android.widget.EditText"); await field.setValue("Hello World!"); const value = await field.getText(); -assert.equal(value, "Hello World!"); +assert.strictEqual(value, "Hello World!"); ``` What's going on here is that after creating a session and launching our app, @@ -258,7 +258,7 @@ async function main () { const field = await client.$("android.widget.EditText"); await field.setValue("Hello World!"); const value = await field.getText(); - assert.equal(value,"Hello World!"); + assert.strictEqual(value,"Hello World!"); await client.deleteSession(); } diff --git a/docs/en/about-appium/platform-support.md b/docs/en/about-appium/platform-support.md index 99dea8901..a0ae74582 100644 --- a/docs/en/about-appium/platform-support.md +++ b/docs/en/about-appium/platform-support.md @@ -13,7 +13,7 @@ iOS automation is supported with two drivers: Please refer to these driver docs for setup instructions. -* Versions: 9.0 and up (as a rule, Appium supports the latest two iOS versions) +* Versions: 12.2 and up (as a rule, Appium supports the latest two iOS versions) * Devices: Simulator and real device for iPhone, iPad and tvOS * Native app support: Yes, with debug version of .app (simulator), or correctly-signed .ipa (real devices). Underlying support is provided by diff --git a/docs/en/advanced-concepts/migrating-to-xcuitest.md b/docs/en/advanced-concepts/migrating-to-xcuitest.md index e3fe70098..8f7add4df 100644 --- a/docs/en/advanced-concepts/migrating-to-xcuitest.md +++ b/docs/en/advanced-concepts/migrating-to-xcuitest.md @@ -76,10 +76,6 @@ driver.findElement(z) where x and y are non-xpath locators and z is a xpath locator). -### System dependencies - -In addition to the many gotchas that might come with upgrading any XCode installation (unrelated to Appium), Appium's XCUITest support requires a new system dependency: [Carthage](https://github.com/Carthage/Carthage). Appium Doctor has now been updated to ensure that the `carthage` binary is on your path. - ### API differences Unfortunately, the XCUITest API and the UIAutomation API are not equivalent. In many cases (like with `tap/click`), the behavior is identical. But some features that were available in the UIAutomation backend are not yet available in the new XCUITest backend. These known lacking features include: diff --git a/docs/en/advanced-concepts/settings.md b/docs/en/advanced-concepts/settings.md index aa62b4124..884aa866c 100644 --- a/docs/en/advanced-concepts/settings.md +++ b/docs/en/advanced-concepts/settings.md @@ -77,7 +77,7 @@ Settings are implemented via the following API endpoints: | `waitForIdleTimeout` | Same as: [setWaitForIdleTimeout](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setWaitForIdleTimeout(long)). If a negative value is given, it would set to default (10 * 1000 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g. `10000` | | `waitForSelectorTimeout` | Same as: [setWaitForSelectorTimeout](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setWaitForSelectorTimeout(long)). If a negative value is given, it would set to default (10 * 1000 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g. `10000` | | `wakeLockTimeout` | Controls the timeout of the acquired wake lock. The lock is acquired on server startup and is held until the UIAutomator2 server is killed or the timeout expires. Setting this value to zero or a negative number will release the lock immediately if it is held. Defaults to '24 * 60 * 60 * 1000' milliseconds. | e.g. `0`, `60000` (1 min) | -|`useResourcesForOrientationDetection`| Whether to use application resource properties to figure out the current device orientation. By default the orientation value is based on the current rotation, which might be incorrect for some particular device types (usually tablets). `false` by default. Available since Appium 1.19.1 | e.g. `true` | +|`useResourcesForOrientationDetection`| Whether to use application resource properties to figure out the current device orientation. By default the orientation value is based on the current rotation, which might be incorrect for some particular device types (usually tablets). `false` by default. Available since Appium 1.20.0 | e.g. `true` | ### iOS Only @@ -92,9 +92,9 @@ Settings are implemented via the following API endpoints: |`mjpegScalingFactor`| Changes the scale of screenshots. Defaults to `100`, no scaling. Integer between `1` and `100` are available. | e.g. `1`, `50`, `100` |1.12.0+| |`keyboardAutocorrection`| Changes the 'Auto-Correction' preference in _Keyboards_ setting. Defaults to `false` when WDA starts as xctest. | `true`, `false` |1.14.0+| |`keyboardPrediction`| Changes the 'Predictive' preference in _Keyboards_ setting. Defaults to `false` when WDA starts as xctest. | `true`, `false` |1.14.0+| -|`customSnapshotTimeout` (`snapshotTimeout` before 1.19.1) | Set how much time is allowed to resolve a single accessibility snapshot with custom attributes. _Snapshots_ are mainly used for page source generation, XML lookup and custom attributes retrieval (these are visibility and accessibility ones). It might be necessary to increase this value if the actual page source is very large and contains hundreds of UI elements. Defaults to 15 seconds. Since Appium 1.19.1 if this timeout expires and no custom snapshot could be made then WDA tries to calculate the missing attributes using its own algorithms, so setting this value to zero might speed up, for example, page source retrieval, but for the cost of some element attribute preciseness. | e.g. `10`, `100` (seconds) |1.15.0+| -|`waitForIdleTimeout`|The amount of time in float seconds to wait until the application under test is idling. XCTest requires the app's main thread to be idling in order to execute any actions on it, so each action, like single click, might take a lot of time in case your app is constantly hogging the main thread. The default value is `10` (seconds). Setting it to zero disables idling checks completely (not recommended).|e.g. `2.5`|1.19.1+| -|`animationCoolOffTimeout`|The amount of time in float seconds to wait until the application under test does not have any active animations. This check is usually applied after each automation action that is supposed to change the state of the application under test, like `click` one, and blocks XCTest until the transition of the tested application to a new state completes or the cool off timeout occurs. The default value is `2` (seconds). Setting it to zero disables animation checks completely.|e.g. `1.5`, `0`|1.19.1+| +|`customSnapshotTimeout` (`snapshotTimeout` before 1.20.0) | Set how much time is allowed to resolve a single accessibility snapshot with custom attributes. _Snapshots_ are mainly used for page source generation, XML lookup and custom attributes retrieval (these are visibility and accessibility ones). It might be necessary to increase this value if the actual page source is very large and contains hundreds of UI elements. Defaults to 15 seconds. Since Appium 1.20.0 if this timeout expires and no custom snapshot could be made then WDA tries to calculate the missing attributes using its own algorithms, so setting this value to zero might speed up, for example, page source retrieval, but for the cost of some element attribute preciseness. | e.g. `10`, `100` (seconds) |1.15.0+| +|`waitForIdleTimeout`|The amount of time in float seconds to wait until the application under test is idling. XCTest requires the app's main thread to be idling in order to execute any actions on it, so each action, like single click, might take a lot of time in case your app is constantly hogging the main thread. The default value is `10` (seconds). Setting it to zero disables idling checks completely (not recommended).|e.g. `2.5`|1.20.0+| +|`animationCoolOffTimeout`|The amount of time in float seconds to wait until the application under test does not have any active animations. This check is usually applied after each automation action that is supposed to change the state of the application under test, like `click` one, and blocks XCTest until the transition of the tested application to a new state completes or the cool off timeout occurs. The default value is `2` (seconds). Setting it to zero disables animation checks completely.|e.g. `1.5`, `0`|1.20.0+| |`snapshotMaxDepth`| Changes the value of maximum depth for traversing elements source tree. It may help to prevent out of memory or timeout errors while getting the elements source tree, but it might restrict the depth of source tree. Please consider restricting this value if you observed an error like _Timed out snapshotting com.apple.testmanagerd..._ message or _Cannot get 'xml' source of the current application_ in your Appium log since they are possibly timeout related. A part of elements source tree might be lost if the value was too small. Defaults to `50` | e.g. `100` | 1.17.0+ | |`useFirstMatch` | Enabling this setting makes single element lookups faster, but there is the known [problem](https://github.com/appium/appium/issues/10101) related to nested elements lookup. Defaults to `false`. |`true`, `false` |1.15.0+| |`reduceMotion`| Changes the 'reduce motion' preference of accessibility feature. | `true`, `false` |1.15.0+| @@ -107,3 +107,6 @@ Settings are implemented via the following API endpoints: | `boundElementsByIndex` | Whether to look up elements with [`allElementsBoundByAccessibilityElement`](https://developer.apple.com/documentation/xctest/xcuielementquery/1500816-allelementsboundbyaccessibilitye) (default) or [`allElementsBoundByIndex`](https://developer.apple.com/documentation/xctest/xcuielementquery/1500945-allelementsboundbyindex). [This Stack Overflow topic](https://stackoverflow.com/questions/49307513/meaning-of-allelementsboundbyaccessibilityelement) explains the differences. Defaults to `false` | `true`, `false` | 1.18.0+ | +### Mac2 + +Please refer to the documentation on the [Mac2Driver repository](https://github.com/appium/appium-mac2-driver#settings-api) diff --git a/docs/en/advanced-concepts/wda-custom-server.md b/docs/en/advanced-concepts/wda-custom-server.md index 7f22e9f92..4d3030c0a 100644 --- a/docs/en/advanced-concepts/wda-custom-server.md +++ b/docs/en/advanced-concepts/wda-custom-server.md @@ -20,8 +20,6 @@ Important points: WebDriverAgent source is automatically downloaded with Appium. The usual folder location in case Appium is installed via npm tool (`npm install -g appium`) is `/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent` -If this was a fresh install then it is also necessary to download third-party dependencies -(_carthage_ tool is mandatory for this purpose: `brew install carthage`): ```bash cd /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent diff --git a/docs/en/commands/device/files/push-file.md b/docs/en/commands/device/files/push-file.md index 73c55f1ca..87fa3e714 100644 --- a/docs/en/commands/device/files/push-file.md +++ b/docs/en/commands/device/files/push-file.md @@ -7,7 +7,7 @@ Place a file onto the device in a particular place ```java // Java -driver.pushFile("/path/to/device/foo.bar", new File("/Users/johndoe/files/foo.bar")); +driver.pushFile("/data/local/tmp/foo.bar", new File("/Users/johndoe/files/foo.bar")); ``` @@ -26,29 +26,29 @@ let data = new Buffer("Hello World").toString('base64'); driver.pushFile('/data/local/tmp/file.txt', data); // wd example -await driver.pushFileToDevice('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8='); +await driver.pushFileToDevice('/data/local/tmp/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8='); ``` ```ruby # Ruby # ruby_lib example -push_file('/path/to/device/foo.bar', File.read('path/to/file.png')) +push_file('/data/local/tmp/foo.bar', File.read('path/to/file.png')) # ruby_lib_core example -@driver.push_file('/path/to/device/foo.bar', File.read('path/to/file.png')) +@driver.push_file('/data/local/tmp/foo.bar', File.read('path/to/file.png')) ``` ```php # PHP -$driver->pushFile('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8='); +$driver->pushFile('/data/local/tmp/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8='); ``` ```csharp // C# -driver.PushFile("/path/to/device/foo.bar", new FileInfo("/Users/johndoe/files/foo.bar")) +driver.PushFile("/data/local/tmp/foo.bar", new FileInfo("/Users/johndoe/files/foo.bar")) ``` diff --git a/docs/en/contributing-to-appium/appium-from-source.md b/docs/en/contributing-to-appium/appium-from-source.md index 51d98befc..cff90559c 100644 --- a/docs/en/contributing-to-appium/appium-from-source.md +++ b/docs/en/contributing-to-appium/appium-from-source.md @@ -64,29 +64,6 @@ node . See [the server documentation](/docs/en/writing-running-appium/server-args.md) for a full list of command line arguments that can be used. -#### Hacking with Appium for iOS - -To avoid a security dialog that may appear when launching your iOS apps you'll -have to modify your `/etc/authorization` file in one of two ways: - -1. Manually modify the element following `` under `system.privilege.taskport` - in your `/etc/authorization` file to ``. - -2. Run the following command which automatically modifies your - `/etc/authorization` file for you: - - ``` - sudo npm run authorize-ios - ``` - -At this point, run: - -``` -rm -rf node_modules && rm -rf package-lock.json && npm install -``` - -Now your Appium instance is ready to go. Run `node .` to kick up the Appium server. - #### Hacking with Appium for Android To work on Android, make sure you have `ant`, `maven`, and `adb` installed diff --git a/docs/en/contributing-to-appium/developers-overview.md b/docs/en/contributing-to-appium/developers-overview.md index 8adf31bde..18176bfee 100644 --- a/docs/en/contributing-to-appium/developers-overview.md +++ b/docs/en/contributing-to-appium/developers-overview.md @@ -177,4 +177,4 @@ checked in to GitHub along with changes to `package.json`. With npm 5+ there is also a `package-lock.json` file produced. During the shrinkwrap process this is converted into the `npm-shrinkwrap.json` file. -Follow directions in [Release Appium Doc](docs/release-appium.md) +Follow directions in [Release Appium Doc](/docs/en/contributing-to-appium/release-appium.md) diff --git a/docs/en/contributing-to-appium/release-appium.md b/docs/en/contributing-to-appium/release-appium.md index 58d382299..8902af6cf 100644 --- a/docs/en/contributing-to-appium/release-appium.md +++ b/docs/en/contributing-to-appium/release-appium.md @@ -11,13 +11,13 @@ Appium follows the GitLab flow approach. Releases are made on release branches t ## Create a release candidate 1. Checkout the release branch (e.g.: `git checkout releases/1.21 && git pull origin releases/1.21`) -1. `bash ./scripts/release-candidate.sh rc` +1. `bash ./scripts/release.sh rc` ## Publish to GA 1. Checkout the release branch (e.g.: `git checkout releases/1.21 && git pull origin releases/1.21`) -1. `bash ./scripts/release-candidate.sh latest` +1. `bash ./scripts/release.sh latest` 1. Update the site docs by going to https://github.com/appium/appium.io/pulls and merging the latest pull request that was opened by the Triager bot. Close any other pull requests opened by Triager bot. 1. Create a new release on GitHub: go to `https://github.com/appium/appium/releases/tag/v` and hit "Edit Tag". Make the release name `` (e.g., `2.0.5`), then paste in the changelog (but not the changelog header for this version). If it's a beta release, mark as pre-release. 1. Create a new post on discuss.appium.io announcing the release. Post it in the "News" category. Paste in the changelog and any choice comments. Pin it and unpin the previous release post. 1. Begin process of releasing `appium-desktop`. -1. Notify @jlipps to so he can tweet a link to the discuss post. \ No newline at end of file +1. Notify @jlipps to so he can tweet a link to the discuss post. diff --git a/docs/en/drivers/ios-uiautomation.md b/docs/en/drivers/ios-uiautomation.md index 1f33fbd6d..00255d37c 100644 --- a/docs/en/drivers/ios-uiautomation.md +++ b/docs/en/drivers/ios-uiautomation.md @@ -55,32 +55,6 @@ Reference](#TODO). simulator may be open, and automated, at any given time. For multiple simulator support, you will need to upgrade to the [XCUITest driver](ios-xcuitest.md)). -1. To allow the iOS simulator to be automated by Instruments, you need to - modify the authorization database for the system. Appium provides an easy - way to do this by installing and running an authorization script: - - ``` - sudo authorize-ios - ``` - -1. By default, Instruments-based automation is limited by the inclusion of - a 1-second hard-coded delay between commands, implemented for obscure - reasons by Apple's engineers. There is a way around this limitation called - [instruments-without-delay](https://github.com/facebookarchive/instruments-without-delay) - (IWD). IWD ships with Appium for Xcode versions < 7. For 7.x and up, IWD - must be installed manually by the user in advance of using Appium. The way - to do this is as follows: - - * Clone the [appium-ios-driver](https://github.com/appium/appium-ios-driver) - repository. - * Inside the repo, run the `xcode-iwd.sh` script included in the `bin` dir, - passing it several arguments: (1) the path to the Xcode app you are - using. (2) The path to the appium-instruments directory. For example: - - ``` - sh ./bin/xcode-iwd.sh /Applications/Xcode.app /Users/me/appium-instruments/ - ``` - 1. For best results, launch each simulator you wish to use and ensure the following: * The soft keyboard is enabled (Command+K in the Simulator app) @@ -163,8 +137,7 @@ $HOME/Library/Logs/CoreSimulator/* ### Running iOS tests using Jenkins First download the `jenkins-cli.jar` and verify that the Mac successfully -connects to Jenkins master. Ensure you've run the `authorize-ios` command -mentioned above. +connects to Jenkins master. ``` wget https://jenkins.ci.cloudbees.com/jnlpJars/jenkins-cli.jar diff --git a/docs/en/drivers/ios-xcuitest.md b/docs/en/drivers/ios-xcuitest.md index 091f83844..f572ec4da 100644 --- a/docs/en/drivers/ios-xcuitest.md +++ b/docs/en/drivers/ios-xcuitest.md @@ -95,12 +95,6 @@ dependencies)_ 1. Ensure that you have Appium's general dependencies (e.g., Node & NPM) installed and configured. -2. Install the [Carthage](https://github.com/Carthage/Carthage) dependency - manager: - - ```bash - brew install carthage - ``` If you don't need to automate real devices, you're done! To automate an app on the simulator, the `app` capability should be set to an absolute path or url diff --git a/docs/en/drivers/mac2.md b/docs/en/drivers/mac2.md index 60bbd787c..176eb5f5d 100644 --- a/docs/en/drivers/mac2.md +++ b/docs/en/drivers/mac2.md @@ -18,7 +18,6 @@ In addition to Appium's general requirements: - macOS 10.15 or later - Xcode 12 or later should be installed - Xcode Helper app should be enabled for Accessibility access. The app itself could be usually found at `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/Xcode Helper.app`. In order to enable Accessibility access for it simply open the parent folder in Finder: `open /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Agents/` and drag & drop the `Xcode Helper` app to `Security & Privacy -> Privacy -> Accessibility` list of your `System Preferences`. This action must only be done once. -- [Carthage](https://github.com/Carthage/Carthage) should be present. On macOS the utility could be installed via [Brew](https://brew.sh/): `brew install carthage` ### Usage diff --git a/docs/en/drivers/windows.md b/docs/en/drivers/windows.md index f4fe11adb..ee08ad248 100644 --- a/docs/en/drivers/windows.md +++ b/docs/en/drivers/windows.md @@ -114,7 +114,7 @@ capabilities entry. Below is an example of creating a test session for Windows DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.SetCapability("app", @"C:\Windows\System32\notepad.exe"); NotepadSession = new WindowsDriver(new Uri("http://127.0.0.1:4723"), appCapabilities); -// Control the AlarmClock app +// Control the Notepad app NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text"); ``` diff --git a/docs/en/writing-running-appium/android/espresso-datamatcher-selector.md b/docs/en/writing-running-appium/android/espresso-datamatcher-selector.md index 3fca87d52..00f72e441 100644 --- a/docs/en/writing-running-appium/android/espresso-datamatcher-selector.md +++ b/docs/en/writing-running-appium/android/espresso-datamatcher-selector.md @@ -6,7 +6,7 @@ By delegating to Espresso's [Data Matcher](https://developer.android.com/referen Android apps have special types of Views called [AdapterViews](https://developer.android.com/reference/android/widget/AdapterView) (e.g.: `ScrollView`, `ListView`, `GridView`) which have child views, but only render that child views that are on-screen. The AdapterView has "adapter" object which stores all the data for that view's children, including the views that aren't being rendered. -When using Espresso's Data Matcher, you can target views that are off-screen by writing a [Hamcrest matcher](http://hamcrest.org/JavaHamcrest/javadoc/1.3/org/hamcrest/Matchers.html) that selects an item from an adapter. If the item is not in the view hierarchy, Espresso automatically scrolls it into view. +When using Espresso's Data Matcher, you can target views that are off-screen by writing a [Hamcrest matcher](https://junit.org/junit4/javadoc/latest/org/hamcrest/class-use/Matcher.html) that selects an item from an adapter. If the item is not in the view hierarchy, Espresso automatically scrolls it into view. ### Example diff --git a/docs/en/writing-running-appium/caps.md b/docs/en/writing-running-appium/caps.md index 89cb86985..ef384c30b 100644 --- a/docs/en/writing-running-appium/caps.md +++ b/docs/en/writing-running-appium/caps.md @@ -271,10 +271,21 @@ Driver](/docs/en/drivers/ios-uiautomation.md). (For XCUITest-specific capabilities, please refer to the documentation on the [XCUITest Driver repo](https://github.com/appium/appium-xcuitest-driver#desired-capabilities) itself.) +### Safaridriver Only + +(For safaridriver capabilities, please refer to the documentation on the [safaridriver repo](https://github.com/appium/appium-safari-driver) itself.) + +### Geckodriver Only + +(For geckodriver capabilities, please refer to the documentation on the [geckodriver repo](https://github.com/appium/appium-geckodriver) itself.) ### MacDriver Only -(For MacDriver capabilities, please refer to the documentation on the [Appium Mac Driver repo](https://github.com/appium/appium-mac-driver#desired-capabilities) itself.) +(For MacDriver capabilities, please refer to the documentation on the [Appium MacDriver repo](https://github.com/appium/appium-mac-driver#desired-capabilities) itself.) + +### Mac2Driver Only + +(For Mac2 Driver capabilities, please refer to the documentation on the [Appium Mac2Driver repo](https://github.com/appium/appium-mac2-driver#capabilities) itself.) ### You.i Engine Only diff --git a/docs/toc.js b/docs/toc.js index 8b9eeed92..b49a5a34b 100644 --- a/docs/toc.js +++ b/docs/toc.js @@ -319,6 +319,7 @@ module.exports = { ['Appium Style Guide', 'style-guide.md'], ['How to Write Docs', 'how-to-write-docs.md'], ['Appium Package Structure', 'appium-packages.md'], + ['Release Appium', 'release-appium.md'], ['Credits', 'credits.md']]] ], cn: [ diff --git a/package.json b/package.json index 31b4155a2..be50271d5 100644 --- a/package.json +++ b/package.json @@ -84,8 +84,7 @@ "generate-docs": "node ./build/commands-yml/parse.js", "zip": "zip -qr appium.zip .", "upload": "gulp github-upload", - "zip-and-upload": "npm run zip && npm run upload", - "authorize-ios": "authorize-ios" + "zip-and-upload": "npm run zip && npm run upload" }, "pre-commit": [ "precommit-msg", diff --git a/sample-code/python/README.md b/sample-code/python/README.md index 715e47e64..d80f5520f 100644 --- a/sample-code/python/README.md +++ b/sample-code/python/README.md @@ -36,10 +36,16 @@ py.test test/test_ios_selectors.py # Tutorial -## Portuguese +## Portuguese 🇧🇷 The brazilian testing community has a complete and free tutorial teaching from 0 to advanced how to use Appium with Python to do software automation. If you can read Portuguese from Brazil, see the tutorial below: [Automação de teste de software com Appium e Python - Por Maria Clara Bezerra (Github)](https://github.com/clarabez/appium) + +## English 🇺🇸 + +Here is the translated version from portugues to english of the free tutorial from 0 to advanced of using Appium with Python for software automation. + +[Software automation with Appium and Python - By Maria Clara Bezerra (Github)](https://github.com/clarabez/appium-en) diff --git a/scripts/release-branch.sh b/scripts/release-branch.sh index c185394ca..230fe0187 100644 --- a/scripts/release-branch.sh +++ b/scripts/release-branch.sh @@ -10,4 +10,4 @@ git commit -m 'add shrinkwrap' echo "* npm version $1.0-rc.0" npm version $1.0-rc.0 git push origin releases/$1 -bash ./scripts/release-candidate.sh +bash ./scripts/release.sh