appium-safari-driver 3.1.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.azure-pipelines.yml +5 -5
- package/.github/workflows/publish.js.yml +4 -4
- package/build/index.js +1 -29
- package/build/lib/commands/find.js +2 -2
- package/build/lib/commands/record-screen.js +2 -2
- package/build/lib/driver.js +3 -3
- package/build/lib/logger.js +2 -2
- package/build/lib/safari.js +5 -5
- package/build/lib/utils.js +1 -1
- package/build/test/functional/desktop-driver-e2e-specs.js +5 -4
- package/build/test/functional/mobile-driver-e2e-specs.js +4 -3
- package/build/test/server.js +21 -0
- package/build/test/unit/driver-specs.js +1 -1
- package/build/test/unit/utils-specs.js +1 -1
- package/index.js +1 -20
- package/lib/commands/find.js +1 -1
- package/lib/commands/record-screen.js +1 -1
- package/lib/driver.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/safari.js +2 -2
- package/package.json +6 -3
- package/test/functional/desktop-driver-e2e-specs.js +2 -1
- package/test/functional/mobile-driver-e2e-specs.js +2 -1
- package/test/server.js +8 -0
- package/build/lib/server.js +0 -36
- package/lib/server.js +0 -15
- package/npm-shrinkwrap.json +0 -2476
package/lib/driver.js
CHANGED
package/lib/logger.js
CHANGED
package/lib/safari.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { JWProxy, errors } from '
|
|
4
|
-
import { fs, logger, util } from '
|
|
3
|
+
import { JWProxy, errors } from 'appium/driver';
|
|
4
|
+
import { fs, logger, util } from 'appium/support';
|
|
5
5
|
import { SubProcess } from 'teen_process';
|
|
6
6
|
import { waitForCondition } from 'asyncbox';
|
|
7
7
|
import { findAPortNotInUse } from 'portscanner';
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"appium",
|
|
6
6
|
"safari"
|
|
7
7
|
],
|
|
8
|
-
"version": "3.
|
|
8
|
+
"version": "3.2.0",
|
|
9
9
|
"author": "appium",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"repository": {
|
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
"lib": "lib"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@appium/base-driver": "^8.3.0",
|
|
37
|
-
"@appium/support": "^2.46.0",
|
|
38
36
|
"@babel/runtime": "^7.0.0",
|
|
39
37
|
"asyncbox": "^2.0.2",
|
|
40
38
|
"bluebird": "^3.5.1",
|
|
@@ -62,12 +60,17 @@
|
|
|
62
60
|
"precommit-msg",
|
|
63
61
|
"precommit-test"
|
|
64
62
|
],
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"appium": "^2.0.0-beta.40"
|
|
65
|
+
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@appium/gulp-plugins": "^7.0.0",
|
|
67
68
|
"@appium/eslint-config-appium": "^6.0.0",
|
|
68
69
|
"@babel/core": "^7.16.0",
|
|
69
70
|
"@babel/eslint-parser": "^7.16.3",
|
|
70
71
|
"@semantic-release/git": "^10.0.1",
|
|
72
|
+
"appium": "^2.0.0-beta.40",
|
|
73
|
+
"appium-safari-driver": "file:.",
|
|
71
74
|
"chai": "^4.1.2",
|
|
72
75
|
"chai-as-promised": "^7.1.1",
|
|
73
76
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { remote } from 'webdriverio';
|
|
2
|
-
import { startServer } from '
|
|
2
|
+
import { startServer } from '../server';
|
|
3
3
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
4
|
import chai from 'chai';
|
|
5
5
|
import { HOST, PORT, MOCHA_TIMEOUT } from '../utils';
|
|
@@ -11,6 +11,7 @@ chai.use(chaiAsPromised);
|
|
|
11
11
|
const CAPS = {
|
|
12
12
|
browserName: 'AppiumSafari',
|
|
13
13
|
platformName: 'mac',
|
|
14
|
+
'appium:automationName': 'safari',
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
describe('Desktop SafariDriver', function () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { remote } from 'webdriverio';
|
|
2
|
-
import { startServer } from '
|
|
2
|
+
import { startServer } from '../server';
|
|
3
3
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
4
|
import chai from 'chai';
|
|
5
5
|
import Simctl from 'node-simctl';
|
|
@@ -13,6 +13,7 @@ const DEVICE_NAME = process.env.DEVICE_NAME || 'iPhone 11 Pro Max';
|
|
|
13
13
|
const CAPS = {
|
|
14
14
|
browserName: 'AppiumSafari',
|
|
15
15
|
platformName: 'ios',
|
|
16
|
+
'appium:automationName': 'safari',
|
|
16
17
|
'safari:useSimulator': true,
|
|
17
18
|
'safari:platformVersion': PLATFORM_VERSION,
|
|
18
19
|
'safari:deviceName': DEVICE_NAME,
|
package/test/server.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { main as startAppium } from 'appium';
|
|
2
|
+
|
|
3
|
+
async function startServer (port, address, relaxedSecurityEnabled = false) {
|
|
4
|
+
// https://github.com/appium/appium/blob/2.0/packages/schema/lib/appium-config.schema.json
|
|
5
|
+
return await startAppium({port, address, relaxedSecurityEnabled});
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { startServer };
|
package/build/lib/server.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.startServer = startServer;
|
|
9
|
-
|
|
10
|
-
require("source-map-support/register");
|
|
11
|
-
|
|
12
|
-
var _logger = _interopRequireDefault(require("./logger"));
|
|
13
|
-
|
|
14
|
-
var _baseDriver = require("@appium/base-driver");
|
|
15
|
-
|
|
16
|
-
var _driver = _interopRequireDefault(require("./driver"));
|
|
17
|
-
|
|
18
|
-
async function startServer(port, address) {
|
|
19
|
-
let d = new _driver.default({
|
|
20
|
-
port,
|
|
21
|
-
address
|
|
22
|
-
});
|
|
23
|
-
let routeConfiguringFunction = (0, _baseDriver.routeConfiguringFunction)(d);
|
|
24
|
-
let server = await (0, _baseDriver.server)({
|
|
25
|
-
routeConfiguringFunction,
|
|
26
|
-
port,
|
|
27
|
-
hostname: address
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
_logger.default.info(`SafariDriver server listening on http://${address}:${port}`);
|
|
31
|
-
|
|
32
|
-
return server;
|
|
33
|
-
}require('source-map-support').install();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGliL3NlcnZlci5qcyIsIm5hbWVzIjpbInN0YXJ0U2VydmVyIiwicG9ydCIsImFkZHJlc3MiLCJkIiwiU2FmYXJpRHJpdmVyIiwicm91dGVDb25maWd1cmluZ0Z1bmN0aW9uIiwic2VydmVyIiwiaG9zdG5hbWUiLCJsb2ciLCJpbmZvIl0sInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL3NlcnZlci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbG9nIGZyb20gJy4vbG9nZ2VyJztcbmltcG9ydCB7XG4gIHNlcnZlciBhcyBiYXNlU2VydmVyLCByb3V0ZUNvbmZpZ3VyaW5nRnVuY3Rpb24gYXMgbWFrZVJvdXRlclxufSBmcm9tICdAYXBwaXVtL2Jhc2UtZHJpdmVyJztcbmltcG9ydCBTYWZhcmlEcml2ZXIgZnJvbSAnLi9kcml2ZXInO1xuXG5hc3luYyBmdW5jdGlvbiBzdGFydFNlcnZlciAocG9ydCwgYWRkcmVzcykge1xuICBsZXQgZCA9IG5ldyBTYWZhcmlEcml2ZXIoe3BvcnQsIGFkZHJlc3N9KTtcbiAgbGV0IHJvdXRlQ29uZmlndXJpbmdGdW5jdGlvbiA9IG1ha2VSb3V0ZXIoZCk7XG4gIGxldCBzZXJ2ZXIgPSBhd2FpdCBiYXNlU2VydmVyKHtyb3V0ZUNvbmZpZ3VyaW5nRnVuY3Rpb24sIHBvcnQsIGhvc3RuYW1lOiBhZGRyZXNzfSk7XG4gIGxvZy5pbmZvKGBTYWZhcmlEcml2ZXIgc2VydmVyIGxpc3RlbmluZyBvbiBodHRwOi8vJHthZGRyZXNzfToke3BvcnR9YCk7XG4gIHJldHVybiBzZXJ2ZXI7XG59XG5cbmV4cG9ydCB7IHN0YXJ0U2VydmVyIH07XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7O0FBQ0E7O0FBR0E7O0FBRUEsZUFBZUEsV0FBZixDQUE0QkMsSUFBNUIsRUFBa0NDLE9BQWxDLEVBQTJDO0VBQ3pDLElBQUlDLENBQUMsR0FBRyxJQUFJQyxlQUFKLENBQWlCO0lBQUNILElBQUQ7SUFBT0M7RUFBUCxDQUFqQixDQUFSO0VBQ0EsSUFBSUcsd0JBQXdCLEdBQUcsMENBQVdGLENBQVgsQ0FBL0I7RUFDQSxJQUFJRyxNQUFNLEdBQUcsTUFBTSx3QkFBVztJQUFDRCx3QkFBRDtJQUEyQkosSUFBM0I7SUFBaUNNLFFBQVEsRUFBRUw7RUFBM0MsQ0FBWCxDQUFuQjs7RUFDQU0sZ0JBQUlDLElBQUosQ0FBVSwyQ0FBMENQLE9BQVEsSUFBR0QsSUFBSyxFQUFwRTs7RUFDQSxPQUFPSyxNQUFQO0FBQ0QifQ==
|
package/lib/server.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import log from './logger';
|
|
2
|
-
import {
|
|
3
|
-
server as baseServer, routeConfiguringFunction as makeRouter
|
|
4
|
-
} from '@appium/base-driver';
|
|
5
|
-
import SafariDriver from './driver';
|
|
6
|
-
|
|
7
|
-
async function startServer (port, address) {
|
|
8
|
-
let d = new SafariDriver({port, address});
|
|
9
|
-
let routeConfiguringFunction = makeRouter(d);
|
|
10
|
-
let server = await baseServer({routeConfiguringFunction, port, hostname: address});
|
|
11
|
-
log.info(`SafariDriver server listening on http://${address}:${port}`);
|
|
12
|
-
return server;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { startServer };
|