Compare commits

...
Author SHA1 Message Date
dan@saucelabs.com e06729c114 1.7.0 2017-09-18 10:19:41 -07:00
Isaac A. Murchie 9fc35d3ba7 Update changelog for 1.7.0 release (#9217) 2017-09-18 10:02:49 -07:00
Isaac A. Murchie 7ca35a3373 Update linting (#9123)
* Update linting

* Move minimum node version to 5

* Remove coverage for now

* Fix docs for node version

* Fail for node 4 and below
2017-08-31 12:24:32 -04:00
Isaac Murchie 704fec138d Prepare for Appium 1.7.0-beta 2017-08-30 08:23:06 -04:00
19 changed files with 5140 additions and 1574 deletions
+1
View File
@@ -1 +1,2 @@
sample-code
coverage
+1
View File
@@ -31,3 +31,4 @@ build/
__pycache__
old
.tern-project
coverage
-11
View File
@@ -1,11 +0,0 @@
{
"excludeFiles": ["node_modules/**"],
"requireCurlyBraces": ["for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch",
"return", "try", "catch", "function"],
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
}
}
-5
View File
@@ -1,5 +0,0 @@
submodules
node_modules
lib/server/static
lib/devices/firefoxos/atoms
/Users/baba/Work/appium/ci/standalone-tools/node_modules
-11
View File
@@ -1,11 +0,0 @@
{
"laxcomma": true,
"undef": true,
"unused": true,
"node": true,
"eqeqeq": true,
"trailing": true,
"indent": 2,
"esnext": true,
"experimental": ["asyncawait"]
}
+1 -1
View File
@@ -12,5 +12,5 @@ _vimrc_local.vim
*.trace
*.sublime-
*.prefs
.jshintrc
./.npmignore
coverage
-4
View File
@@ -3,7 +3,6 @@ sudo: false
node_js:
- "7"
- "6"
- "4"
env:
- CXX=g++-4.8
addons:
@@ -13,7 +12,4 @@ addons:
packages:
- g++-4.8
script:
- npm run lint
- npm run test
after_success:
- gulp coveralls
+112
View File
@@ -1,3 +1,115 @@
CHANGES IN VERSION 1.7.0 (from 1.6.5)
===================================
**Note:** This is a feature release, marking two major changes:
* Support iOS 11 through Xcode 9 beta 6
* Support multiple simultaneous sessions in Android and iOS (9+)
**Known Issues:**
* Android
* Webviews on Android O do not work because of a bug in Chromedriver. We
are working on a workaround. Chrome sessions still work
* iOS
* Touch ID enrollment on simulators in Xcode 9 does not work because of an
issue with AppleScript
* Scaling simulators with Xcode 9 does not work
* Simulators in Xcode 9 produce no meaningful device logs
* Parallel Safari/Webview sessions are not working due to an Apple bug
#### General
* Fix handling of sending keys to elements in recent versions of Selenium
* Allow `app` capability that is a url to have query parameters
* Begin to allow multiple device support in situations where it is possible
(e.g., iOS under Xcode 9)
* Add `isHeadless` capability to allow running simulator/emulator with no UI
#### iOS
* Add command to upload media to simulator
* Fix reliability of touch ID functionality
* Fix detection of system apps
* Update atoms used for MobileSafari automation to those of Selenium 3.5.3
* Add `realDeviceLogger` capability to allow specification of what program to
use to capture logs on real device
* Fix handling of `enablePerformanceLogging` capability in Safari tests
* Fix offset when Safari on an iPad has multiple tabs
#### iOS - XCUITest
* Support for latest Beta of iOS 11 (Xcode 9 beta 6)
* Multiple device support
* Fix handling of bundle id on simulators
* Make `nativeWebTap` a setting as well as a desired capability
* Allow `nativeWebTap` to work on real devices
* Do not try to uninstall app before installing on real device, which was causing
many issues
* Fix clearing of text fields
* Change behavior of `useNewWDA`: if `true`, forces uninstall of any existing
WebDriverAgent app on device. Set it to `true` if you want to apply different
startup options for WebDriverAgent for each session. Real devices require
WebDriverAgent client to run for as long as possible without reinstall/restart
to avoid issues. The `false` value will try to detect currently running WDA
listener executed by previous testing session(s) and reuse it if possible,
which is highly recommended for real device testing and to speed up suites of
multiple tests in general. A new WDA session will be triggered at the default
URL (http://localhost:8100) if WDA is not listening and `webDriverAgentUrl`
capability is not set.
* Allow setting url in native context
* Fix screenshot functionality
#### Android
* Add `remoteAdbHost` capability to specify the host on which adb is running, if
it is not localhost
* Add methods to start and stop recording the screen
* Fix screenshot commands
* Skip setting of mock location for emulators
* Add methods for emulator phone capacity: `sendSMS`, `gsmCall`, `gsmSignal`,
`gsmVoice`, `powerAC`, `powerCapacity`, and `networkSpeed`
* Fix cleanup of adb port forwarding during Chrome sessions
* Fix error where package name would be appended to fully qualified activity
name and package finding would then fail
* Properly handle bootstrap failure on launch
* Make sure correct logger is used for bootstrap
#### Android - UIAutomator 2
* Fix handling of `adbPort` capability
* Fix coverage handling
* Handle pressing and long pressing key codes
* Enable `nativeWebScreenshot` capability
* Fix restoring of IME when `unicodeKeyboard`/`resetKeyboard` capabilities are
used
* Add `disableWindowAnimation` capability to launch instrumentation with no
animation
* Correctly start ChromeDriver session for Chrome session
* Allow getting `password` attribute from elements
CHANGES IN VERSION 1.7.0-beta (from 1.6.5)
===================================
**Note:** This is a **_BETA_** release. Please direct any issues to the [Appium
issue tracker](https://github.com/appium/appium/issues) and provide as much
information as possible.
This release exists to provide an updatable package in order to get the latest
work on Appium. To install, first uninstall Appium and then re-install with the
`beta` tag. To get any changes that have been published to sub-packages, simply
repeat that process.
```
npm uninstall -g appium
npm install -g appium@beta
```
If you are running iOS tests with the XCUITest backend (i.e., iOS 10+ tests, and
some iOS 9.3 tests, if the `automationName` capability is set to `XCUITest`), you
should also remove the old build artifacts.
1. Remove derived data: `rm -rf ~/Library/Developer/Xcode/DerivedData/WebDriverAgent-*`
2. Remove `WebDriverAgentRunner` application from any real device being tested.
#### Android
* Add beta version of Espresso Driver. To use, set `automationName = espresso`.
CHANGES IN VERSION 1.6.6-beta.4 (from 1.6.5)
===================================
+9 -9
View File
@@ -20,25 +20,25 @@
"use strict";
var spawn = require('child_process').spawn,
_ = require('lodash');
const spawn = require('child_process').spawn;
const _ = require('lodash');
var args = process.argv.slice(2);
const args = process.argv.slice(2);
var RESTART_ON_MESSAGES = [
const RESTART_ON_MESSAGES = [
'Invalid message _rpc_applicationUpdated',
'Invalid message _rpc_applicationSentListing'];
var PROXY_CMD = 'ios_webkit_debug_proxy';
var proxy;
const PROXY_CMD = 'ios_webkit_debug_proxy';
let proxy;
var handleKillProcess = function (exitCode) {
const handleKillProcess = function (exitCode) {
console.log('\nKilling proxy process!');
proxy.kill('SIGTERM');
process.exit((exitCode || 0));
};
var startProxy = function () {
const startProxy = function () {
console.log('RUNNING:', PROXY_CMD, args.join(' '));
proxy = spawn(PROXY_CMD, args);
@@ -49,7 +49,7 @@ var startProxy = function () {
proxy.stderr.on('data', function (data) {
console.log('stderr: ' + data);
var restartMessage = _(RESTART_ON_MESSAGES).find(function (message) {
const restartMessage = _(RESTART_ON_MESSAGES).find(function (message) {
return ('' + data).indexOf(message) >= 0;
});
if (restartMessage) {
@@ -4,7 +4,7 @@
## appium
- runs basic checks
- node version (>= 4)
- node version (>= 5)
- CLI arguments checks
- contains all available and supported CLI arguments
- check for deprecation and mutual exclusion
@@ -228,7 +228,7 @@
- contains task for
- e2e and unit tests (with coverage reporting)
- transpiling ES2016 into ES5
- static code analysis (jshint)
- static code analysis (eslint)
- watch task for dev
## appium-remote-debugger
+14 -16
View File
@@ -6,15 +6,15 @@
// getting sent to the handler
process.env._FORCE_LOGS="1";
var gulp = require('gulp'),
boilerplate = require('appium-gulp-plugins').boilerplate.use(gulp),
path = require('path'),
fs = require('fs');
const gulp = require('gulp');
const boilerplate = require('appium-gulp-plugins').boilerplate.use(gulp);
const path = require('path');
const fs = require('fs');
// remove 'fsevents' from shrinkwrap, since it causes errors on non-Mac hosts
// see https://github.com/npm/npm/issues/2679
gulp.task('fixShrinkwrap', function (done) {
var shrinkwrap;
let shrinkwrap;
try {
shrinkwrap = require('./npm-shrinkwrap.json');
} catch (err) {
@@ -23,7 +23,7 @@ gulp.task('fixShrinkwrap', function (done) {
return;
}
delete shrinkwrap.dependencies.fsevents;
var shrinkwrapString = JSON.stringify(shrinkwrap, null, ' ') + '\n';
const shrinkwrapString = JSON.stringify(shrinkwrap, null, ' ') + '\n';
fs.writeFile('./npm-shrinkwrap.json', shrinkwrapString, done);
});
@@ -32,8 +32,6 @@ gulp.task('fixShrinkwrap', function (done) {
boilerplate({
build: 'appium',
jscs: false,
jshint: false,
test: {
files: ['${testDir}/**/*-specs.js']
},
@@ -43,10 +41,10 @@ boilerplate({
// generates server arguments readme
gulp.task('docs', ['transpile'], function () {
var parser = require('./build/lib/parser.js');
var appiumArguments = parser.getParser().rawArgs;
var docFile = path.resolve(__dirname, "docs/en/writing-running-appium/server-args.md");
var md = "# Appium server arguments\n\n";
const parser = require('./build/lib/parser.js');
const appiumArguments = parser.getParser().rawArgs;
const docFile = path.resolve(__dirname, "docs/en/writing-running-appium/server-args.md");
let md = "# Appium server arguments\n\n";
md += "Many Appium 1.5 server arguments have been deprecated in favor of the ";
md += "[--default-capabilities flag](/docs/en/writing-running-appium/default-capabilities-arg.md).";
md += "\n\nUsage: `node . [flags]`\n\n";
@@ -57,14 +55,14 @@ gulp.task('docs', ['transpile'], function () {
md += "|Flag|Default|Description|Example|\n";
md += "|----|-------|-----------|-------|\n";
appiumArguments.forEach(function (arg) {
var argNames = arg[0];
var exampleArg = typeof arg[0][1] === "undefined" ? arg[0][0] : arg[0][1];
var argOpts = arg[1];
const argNames = arg[0];
const exampleArg = typeof arg[0][1] === "undefined" ? arg[0][0] : arg[0][1];
const argOpts = arg[1];
// --keystore-path defaultValue contains a user-specific path,
// let's replace it with <user>/...
if (arg[0][0] === '--keystore-path') {
var userPath = process.env.HOME || process.env.USERPROFILE;
const userPath = process.env.HOME || process.env.USERPROFILE;
argOpts.defaultValue = argOpts.defaultValue.replace(userPath, '&lt;user&gt;');
}
+3 -3
View File
@@ -38,8 +38,8 @@ async function getAppiumConfig () {
function checkNodeOk () {
let [major, minor] = getNodeVersion();
if (major < 4) {
let msg = `Node version must be >= 4. Currently ${major}.${minor}`;
if (major < 5) {
let msg = `Node version must be >= 5. Currently ${major}.${minor}`;
logger.errorAndThrow(msg);
}
}
@@ -85,7 +85,7 @@ function getDeprecatedArgs (parser, args) {
}
function checkValidPort (port, portName) {
if (port > 0 && port < 65536) return true;
if (port > 0 && port < 65536) return true; // eslint-disable-line curly
logger.error(`Port '${portName}' must be greater than 0 and less than 65536. Currently ${port}`);
return false;
}
+1 -1
View File
@@ -45,7 +45,7 @@ async function postRequest (data, addr, port) {
// Move Selenium 3 configuration properties to configuration object
if (!jsonObject.hasOwnProperty('configuration')) {
let configuration = {};
for (var property in jsonObject) {
for (let property in jsonObject) {
if (jsonObject.hasOwnProperty(property) && property !== 'capabilities') {
configuration[property] = jsonObject[property];
delete jsonObject[property];
+3515
View File
File diff suppressed because it is too large Load Diff
+1453 -1472
View File
File diff suppressed because it is too large Load Diff
+15 -12
View File
@@ -11,7 +11,7 @@
"firefoxos",
"testing"
],
"version": "1.6.6-beta.4",
"version": "1.7.0",
"author": "https://github.com/appium",
"license": "Apache-2.0",
"repository": {
@@ -22,7 +22,7 @@
"url": "https://github.com/appium/appium/issues"
},
"engines": {
"node": ">=4",
"node": ">=5",
"npm": ">=3"
},
"main": "./build/lib/main.js",
@@ -64,25 +64,28 @@
"scripts": {
"prepublish": "gulp prepublish",
"test": "gulp once",
"watch": "gulp",
"watch": "gulp watch",
"build": "gulp transpile",
"mocha": "mocha",
"precommit-msg": "echo 'Pre-commit checks...' && exit 0",
"lint": "gulp eslint"
"precommit-test": "REPORTER=dot gulp once",
"lint": "gulp eslint",
"coverage": "gulp coveralls"
},
"pre-commit": [
"precommit-msg",
"lint",
"test"
"precommit-test"
],
"devDependencies": {
"appium-gulp-plugins": "1.x",
"babel-eslint": "6.x",
"appium-gulp-plugins": "2.x",
"babel-eslint": "7.x",
"chai": "3.x",
"chai-as-promised": "5.x",
"eslint": "2.x",
"eslint-config-appium": "0.x",
"eslint": "3.x",
"eslint-config-appium": "2.x",
"eslint-plugin-babel": "3.x",
"eslint-plugin-import": "1.x",
"eslint-plugin-mocha": "3.x",
"eslint-plugin-import": "2.x",
"eslint-plugin-mocha": "4.x",
"eslint-plugin-promise": "3.x",
"gulp": "3.x",
"mocha": "2.x",
-21
View File
@@ -1,21 +0,0 @@
{
"laxcomma": true,
"undef": true,
"unused": true,
"trailing": true,
"node": true,
"eqeqeq": true,
"expr": true,
"white": true,
"indent": 2,
"esnext": true,
"experimental": ["asyncawait"],
"globals": {
"describe": true,
"it": true,
"before": true,
"after": true,
"beforeEach": true,
"afterEach": true
}
}
+10 -4
View File
@@ -65,6 +65,8 @@ describe('Config', () => {
});
describe('checkNodeOk', () => {
it('should fail if node is below 4', () => {
process.version = 'v4.4.7';
checkNodeOk.should.throw();
process.version = 'v0.9.12';
checkNodeOk.should.throw();
process.version = 'v0.1';
@@ -74,10 +76,6 @@ describe('Config', () => {
process.version = 'v0.12.14';
checkNodeOk.should.throw();
});
it('should succeed if node is 4+', () => {
process.version = 'v4.4.7';
checkNodeOk.should.not.throw();
});
it('should succeed if node is 5+', () => {
process.version = 'v5.7.0';
checkNodeOk.should.not.throw();
@@ -86,6 +84,14 @@ describe('Config', () => {
process.version = 'v6.3.1';
checkNodeOk.should.not.throw();
});
it('should succeed if node is 7+', () => {
process.version = 'v7.1.1';
checkNodeOk.should.not.throw();
});
it('should succeed if node is 8+', () => {
process.version = 'v8.1.2';
checkNodeOk.should.not.throw();
});
});
describe('warnNodeDeprecations', () => {
+3 -2
View File
@@ -4,8 +4,9 @@ import _ from 'lodash';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
chai.use(chaiAsPromised);
var expect = chai.expect;
const expect = chai.expect;
describe.skip('shrinkwrap checks', () => {
it('shrinkwrap file should exist', async () => {
@@ -18,7 +19,7 @@ describe.skip('shrinkwrap checks', () => {
let shrinkwrap = require('../../npm-shrinkwrap.json');
expect(shrinkwrap.dependencies, 'no shrinkwrap file found. run `npm shrinkwrap`').to.exist;
_.values(shrinkwrap.dependencies).length.should.be.above(10);
var message = "'fsevents' entry found in shrinkwrap. It causes problems " +
let message = "'fsevents' entry found in shrinkwrap. It causes problems " +
"on non-Mac systems. run `gulp fixShrinkwrap` and try again";
expect(shrinkwrap.dependencies.fsevents, message).to.not.exist;
});