Skip to content

Commit

Permalink
ci: update release flow (#95)
Browse files Browse the repository at this point in the history
* update ci

* add upload on the build pr

* add xattr -cr AppiumForMac.app

* add note about xattr

* tweak name

* remove upload

* add release section

* Update release.yml

* Update release.yml
  • Loading branch information
KazuCocoa committed Jul 28, 2020
1 parent 56c3a19 commit b5c9ca8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -15,9 +15,10 @@ jobs:
- uses: actions/checkout@v2
- name: Run xcodebuild
run: xcodebuild -scheme AppiumForMac -configuration Debug -derivedDataPath $GITHUB_WORKSPACE build
- name: Archive the AppiumForMac.app
- name: Archive the AppiumForMac.app without extended metadata
run: |
mv $GITHUB_WORKSPACE/Build/Products/Debug/AppiumForMac.app $GITHUB_WORKSPACE
xattr -cr AppiumForMac.app
zip -r Debug_AppiumForMac.zip AppiumForMac.app
- name: Upload the AppiumForMac.app
uses: actions/upload-artifact@v2
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Expand Up @@ -14,9 +14,10 @@ jobs:
- uses: actions/checkout@v2
- name: Run xcodebuild
run: xcodebuild -scheme AppiumForMac -configuration Debug -derivedDataPath $GITHUB_WORKSPACE build
- name: Archive the AppiumForMac.app
- name: Archive the AppiumForMac.app without extended metadata
run: |
mv $GITHUB_WORKSPACE/Build/Products/Debug/AppiumForMac.app $GITHUB_WORKSPACE
xattr -cr AppiumForMac.app
zip -r Debug_AppiumForMac.zip AppiumForMac.app
- name: Create Release
id: create_release
Expand All @@ -25,14 +26,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Created by Actions automatically
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- Release note
draft: true
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Debug_AppiumForMac
id: upload-release-asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
27 changes: 21 additions & 6 deletions README.md
Expand Up @@ -6,7 +6,7 @@ The WebDriver server is on port 4622. If you build it yourself, you can change t

## Requirements
* Running: Mac OS X 10.7 or later.
* Building: Xcode 7.2.1 or later.
* Building: Xcode 7.2.1 or later.

## Installation
Mac OS X does not allow an application to use the Accessibility API without permission, so you have to enable it manually.
Expand All @@ -33,6 +33,21 @@ Newer macOS requires 64 bit binary.
You can build this repository manually to match for your environment with Xcode.
Then, please copy `AppiumForMac.app` in `/Users/<username>/Library/Developer/Xcode/DerivedData/AppiumForMac-xxxxxxxx/Build/Products/Debug/AppiumForMac.app` to `/Applications`.

## Release

Please push a tag with `v` prefix like `v0.5.0`.
Then, a GitHub Actions will push a new `AppiumForMac.app` as the version as a draft on [Release page](https://github.com/appium/appium-for-mac/releases).
Once you convert the draft to publish, the tag will appear on the release page.

### Download binaries built on CI

[Release page](https://github.com/appium/appium-for-mac/releases) provides `AppiumForMac.app` for each tag.
You also can get the latest `AppiumForMac.app` on each PR.

If you could not start `AppiumForMac.app` by security limitation by macOS,
please try out `xattr -cr /path/to/AppiumForMac.app` command once to remove extende attributes on macOS.
Then, you probably open the `AppiumForMac.app` without error.

## New Features For Scripters (as of April 2017)

You can see the new features in the calculator.py example script.
Expand Down Expand Up @@ -116,7 +131,7 @@ Bad examples:


### Automatic AXPath Recording
Generating an AXPath for an element is easy: while AppiumForMac is running, just use the mouse to point to an element, then press the fn (function) key for a couple of seconds. AppiumForMac will build the AXPath of the element on screen, and copy it to the clipboard. You can then paste it into your script.
Generating an AXPath for an element is easy: while AppiumForMac is running, just use the mouse to point to an element, then press the fn (function) key for a couple of seconds. AppiumForMac will build the AXPath of the element on screen, and copy it to the clipboard. You can then paste it into your script.

### Session Kill Switch
If your script has gone off the rails, you need to stop it. But if a script is running, it can keep typing and clicking as you try to cancel it. Now, while a session is in progress, you can press the fn (function) key for a couple of seconds. AppiumForMac will cancel any open sessions. Your script will receive a "no such session" error.
Expand All @@ -127,19 +142,19 @@ AppiumForMac sessions have several new properties. See below for a description o
#### Getting and Setting Properties with a Cookie
Each cookie is a dictionary with at least two keys: 'name' and 'value'. The Selenium commands are: get_cookies, get_cookie(), and addCookie().

1. To get all cookies, use driver.get_cookies(). This will return an array of cookie dictionaries.
1. To get all cookies, use driver.get_cookies(). This will return an array of cookie dictionaries.
1. To get one cookie, use driver.get_cookie('cookieName'). This will return the cookie with the name 'cookieName'.
1. To set a cookie, use driver.add_cookie({'name': 'cookieName', 'value': 'cookieValue'}).

#### Implicit Timeouts
AppiumForMac supports standard implicit timeouts when finding an element. The default is 0.0 seconds, that is, there will be only one attempt.

For example, to set a 20.5 second timeout, use driver.add_cookie({'name': 'implicit_timeout', 'value': 20.5}).
For example, to set a 20.5 second timeout, use driver.add_cookie({'name': 'implicit_timeout', 'value': 20.5}).

#### Loop Delay
During an implicit timeout to find an element, you can specify how long to wait between attempts. The default is 1.0 seconds. The loop delay occurs _after_ each attempt, so if the element is found on the first attempt, there will be no delay. The total waiting time will not exceed implicit_timeout, regardless of the loop_delay value.

For example, to set a 1.7 second loop delay, use driver.add_cookie({'name': 'loop_delay', 'value': 1.7}).
For example, to set a 1.7 second loop delay, use driver.add_cookie({'name': 'loop_delay', 'value': 1.7}).

#### Command Delay
This provides a simple way to slow down a script if needed, e.g. for debugging. It specifies an arbitrary delay _before_ each command. The default is 0.0 seconds so your script runs at full speed!
Expand Down Expand Up @@ -176,7 +191,7 @@ The name of each handler is dynamically constructed from the http request. All y
#### Creating a new command handler

1. Go to AfMHandlers.m.
1. Find an existing handler method. You might want to find one that is similar to the new command you want to add.
1. Find an existing handler method. You might want to find one that is similar to the new command you want to add.
1. Copy the handler method to the clipboard.
1. Find the commented out stub for the new handler method and paste at that location.
1. Rename your new handler, following the naming pattern for the other handlers.
Expand Down

0 comments on commit b5c9ca8

Please sign in to comment.