@ohos-ports/webdriver-manager 0.0.0-stage → 12.1.9-beta.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/.circleci/config.yml +24 -0
- package/CHANGELOG.md +670 -0
- package/CONTRIBUTING.md +61 -0
- package/LICENSE +21 -0
- package/README.md +75 -2
- package/bin/webdriver-manager +56 -0
- package/built/config.json +18 -0
- package/built/lib/binaries/android_sdk.d.ts +26 -0
- package/built/lib/binaries/android_sdk.js +103 -0
- package/built/lib/binaries/android_sdk.js.map +1 -0
- package/built/lib/binaries/appium.d.ts +18 -0
- package/built/lib/binaries/appium.js +42 -0
- package/built/lib/binaries/appium.js.map +1 -0
- package/built/lib/binaries/binary.d.ts +66 -0
- package/built/lib/binaries/binary.js +76 -0
- package/built/lib/binaries/binary.js.map +1 -0
- package/built/lib/binaries/chrome_driver.d.ts +12 -0
- package/built/lib/binaries/chrome_driver.js +38 -0
- package/built/lib/binaries/chrome_driver.js.map +1 -0
- package/built/lib/binaries/chrome_xml.d.ts +36 -0
- package/built/lib/binaries/chrome_xml.js +156 -0
- package/built/lib/binaries/chrome_xml.js.map +1 -0
- package/built/lib/binaries/config_source.d.ts +38 -0
- package/built/lib/binaries/config_source.js +209 -0
- package/built/lib/binaries/config_source.js.map +1 -0
- package/built/lib/binaries/gecko_driver.d.ts +13 -0
- package/built/lib/binaries/gecko_driver.js +50 -0
- package/built/lib/binaries/gecko_driver.js.map +1 -0
- package/built/lib/binaries/gecko_driver_github.d.ts +14 -0
- package/built/lib/binaries/gecko_driver_github.js +93 -0
- package/built/lib/binaries/gecko_driver_github.js.map +1 -0
- package/built/lib/binaries/iedriver.d.ts +13 -0
- package/built/lib/binaries/iedriver.js +38 -0
- package/built/lib/binaries/iedriver.js.map +1 -0
- package/built/lib/binaries/iedriver_xml.d.ts +9 -0
- package/built/lib/binaries/iedriver_xml.js +69 -0
- package/built/lib/binaries/iedriver_xml.js.map +1 -0
- package/built/lib/binaries/index.d.ts +7 -0
- package/built/lib/binaries/index.js +13 -0
- package/built/lib/binaries/index.js.map +1 -0
- package/built/lib/binaries/standalone.d.ts +13 -0
- package/built/lib/binaries/standalone.js +41 -0
- package/built/lib/binaries/standalone.js.map +1 -0
- package/built/lib/binaries/standalone_xml.d.ts +9 -0
- package/built/lib/binaries/standalone_xml.js +89 -0
- package/built/lib/binaries/standalone_xml.js.map +1 -0
- package/built/lib/cli/cli.d.ts +57 -0
- package/built/lib/cli/cli.js +136 -0
- package/built/lib/cli/cli.js.map +1 -0
- package/built/lib/cli/index.d.ts +4 -0
- package/built/lib/cli/index.js +10 -0
- package/built/lib/cli/index.js.map +1 -0
- package/built/lib/cli/logger.d.ts +95 -0
- package/built/lib/cli/logger.js +264 -0
- package/built/lib/cli/logger.js.map +1 -0
- package/built/lib/cli/options.d.ts +22 -0
- package/built/lib/cli/options.js +67 -0
- package/built/lib/cli/options.js.map +1 -0
- package/built/lib/cli/programs.d.ts +93 -0
- package/built/lib/cli/programs.js +226 -0
- package/built/lib/cli/programs.js.map +1 -0
- package/built/lib/cli_instance.d.ts +2 -0
- package/built/lib/cli_instance.js +18 -0
- package/built/lib/cli_instance.js.map +1 -0
- package/built/lib/cmds/clean.d.ts +2 -0
- package/built/lib/cmds/clean.js +39 -0
- package/built/lib/cmds/clean.js.map +1 -0
- package/built/lib/cmds/index.d.ts +1 -0
- package/built/lib/cmds/index.js +7 -0
- package/built/lib/cmds/index.js.map +1 -0
- package/built/lib/cmds/initialize.d.ts +3 -0
- package/built/lib/cmds/initialize.js +244 -0
- package/built/lib/cmds/initialize.js.map +1 -0
- package/built/lib/cmds/opts.d.ts +38 -0
- package/built/lib/cmds/opts.js +91 -0
- package/built/lib/cmds/opts.js.map +1 -0
- package/built/lib/cmds/shutdown.d.ts +2 -0
- package/built/lib/cmds/shutdown.js +46 -0
- package/built/lib/cmds/shutdown.js.map +1 -0
- package/built/lib/cmds/start.d.ts +2 -0
- package/built/lib/cmds/start.js +458 -0
- package/built/lib/cmds/start.js.map +1 -0
- package/built/lib/cmds/status.d.ts +2 -0
- package/built/lib/cmds/status.js +120 -0
- package/built/lib/cmds/status.js.map +1 -0
- package/built/lib/cmds/update.d.ts +3 -0
- package/built/lib/cmds/update.js +300 -0
- package/built/lib/cmds/update.js.map +1 -0
- package/built/lib/cmds/version.d.ts +2 -0
- package/built/lib/cmds/version.js +17 -0
- package/built/lib/cmds/version.js.map +1 -0
- package/built/lib/config.d.ts +58 -0
- package/built/lib/config.js +97 -0
- package/built/lib/config.js.map +1 -0
- package/built/lib/files/downloaded_binary.d.ts +14 -0
- package/built/lib/files/downloaded_binary.js +32 -0
- package/built/lib/files/downloaded_binary.js.map +1 -0
- package/built/lib/files/downloader.d.ts +20 -0
- package/built/lib/files/downloader.js +103 -0
- package/built/lib/files/downloader.js.map +1 -0
- package/built/lib/files/file_manager.d.ts +72 -0
- package/built/lib/files/file_manager.js +239 -0
- package/built/lib/files/file_manager.js.map +1 -0
- package/built/lib/files/index.d.ts +3 -0
- package/built/lib/files/index.js +9 -0
- package/built/lib/files/index.js.map +1 -0
- package/built/lib/http_utils.d.ts +27 -0
- package/built/lib/http_utils.js +118 -0
- package/built/lib/http_utils.js.map +1 -0
- package/built/lib/utils.d.ts +6 -0
- package/built/lib/utils.js +115 -0
- package/built/lib/utils.js.map +1 -0
- package/built/lib/webdriver.d.ts +0 -0
- package/built/lib/webdriver.js +22 -0
- package/built/lib/webdriver.js.map +1 -0
- package/built/package.json +85 -0
- package/config.json +18 -0
- package/docs/README.md +6 -0
- package/docs/mobile.md +79 -0
- package/docs/protractor.md +41 -0
- package/docs/versions.md +87 -0
- package/gulpfile.js +44 -0
- package/package.json +83 -4
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Contributing
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
Questions
|
|
5
|
+
---------
|
|
6
|
+
|
|
7
|
+
Please ask support questions on [StackOverflow](http://stackoverflow.com/questions/tagged/webdriver-manager) or [Gitter](https://gitter.im/angular/webdriver-manager).
|
|
8
|
+
|
|
9
|
+
Any questions posted to webdriver-manager's Github Issues will be closed with this note:
|
|
10
|
+
|
|
11
|
+
Please direct general support questions like this one to an appropriate support channel, see https://github.com/angular/webdriver-manager/blob/master/CONTRIBUTING.md#questions. Thank you!
|
|
12
|
+
|
|
13
|
+
Issues
|
|
14
|
+
======
|
|
15
|
+
|
|
16
|
+
If you have a bug or feature request, please file an issue. When submitting an issue, please include a reproducible case that we can actually run.
|
|
17
|
+
|
|
18
|
+
Please format code and markup in your issue using [github markdown](https://help.github.com/articles/github-flavored-markdown).
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Contributing to Source Code (Pull Requests)
|
|
22
|
+
===========================================
|
|
23
|
+
|
|
24
|
+
Loosely, follow the [Angular contribution rules](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md).
|
|
25
|
+
|
|
26
|
+
* If your PR changes any behavior or fixes an issue, it should have an associated test.
|
|
27
|
+
* New features should be general and as simple as possible.
|
|
28
|
+
* Breaking changes should be avoided if possible.
|
|
29
|
+
* All pull requests require review. No PR will be submitted without a comment from a team member stating LGTM (Looks good to me).
|
|
30
|
+
|
|
31
|
+
Webdriver-manager specific rules
|
|
32
|
+
-------------------------
|
|
33
|
+
|
|
34
|
+
* JavaScript style should generally follow the [Google JS style guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml).
|
|
35
|
+
* Wrap code at 100 chars.
|
|
36
|
+
* Document public methods with jsdoc.
|
|
37
|
+
* Be consistent with the code around you!
|
|
38
|
+
|
|
39
|
+
Commit Messages
|
|
40
|
+
---------------
|
|
41
|
+
|
|
42
|
+
Please write meaningful commit messages - they are used to generate the changelog, so the commit message should tell a user everything they need to know about a commit. Webdriver-manager follows AngularJS's [commit message format](https://docs.google.com/a/google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.z8a3t6ehl060).
|
|
43
|
+
|
|
44
|
+
In summary, this style is
|
|
45
|
+
|
|
46
|
+
<type>(<scope>): <subject>
|
|
47
|
+
<BLANK LINE>
|
|
48
|
+
<body>
|
|
49
|
+
|
|
50
|
+
Where `<type>` is one of [feat, fix, docs, refactor, test, chore, deps] and
|
|
51
|
+
`<scope>` is a quick descriptor of the location of the change, such as cli, clientSideScripts, element.
|
|
52
|
+
|
|
53
|
+
Testing your changes
|
|
54
|
+
--------------------
|
|
55
|
+
|
|
56
|
+
Test your changes on your machine by running `npm test` to run the test suite.
|
|
57
|
+
|
|
58
|
+
When you submit a PR, tests will also be run on the Continuous Integration environment
|
|
59
|
+
through Travis. If your tests fail on Travis, take a look at the logs - if the failures
|
|
60
|
+
are known flakes in Internet Explorer or Safari you can ignore them, but otherwise
|
|
61
|
+
Travis should pass.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-2017 Google, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,76 @@
|
|
|
1
|
-
# Temporary Holding Version
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
Webdriver Manager [](https://circleci.com/gh/angular/webdriver-manager) [](https://gitter.im/angular/webdriver-manager?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
3
|
+
=================
|
|
4
|
+
|
|
5
|
+
A selenium server and browser driver manager for your end to end tests. This is the same tool as `webdriver-manager` from the [Protractor](https://github.com/angular/protractor) repository.
|
|
6
|
+
|
|
7
|
+
**Note:** Version 9 and lower please reference [pose/webdriver-manager](https://github.com/pose/webdriver-manager). If there are features that existed in version 9 and lower, please open up an issue with the missing feature or a create a pull request.
|
|
8
|
+
|
|
9
|
+
Getting Started
|
|
10
|
+
---------------
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
npm install -g webdriver-manager
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Setting up a Selenium Server
|
|
17
|
+
----------------------------
|
|
18
|
+
|
|
19
|
+
Prior to starting the selenium server, download the selenium server jar and driver binaries. By default it will download the selenium server jar and chromedriver binary.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
webdriver-manager update
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Starting the Selenium Server
|
|
26
|
+
----------------------------
|
|
27
|
+
|
|
28
|
+
By default, the selenium server will run on `http://localhost:4444/wd/hub`.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
webdriver-manager start
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Other useful commands
|
|
36
|
+
---------------------
|
|
37
|
+
|
|
38
|
+
View different versions of server and driver files:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
webdriver-manager status
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Clear out the server and driver files. If `webdriver-manager start` does not work, try to clear out the saved files.
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
webdriver-manager clean
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Running / stopping server in background process (stopping is not yet supported on standalone server 3.x.x):
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
webdriver-manager start --detach
|
|
54
|
+
webdriver-manager shutdown
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Help commands
|
|
58
|
+
-------------
|
|
59
|
+
|
|
60
|
+
Wedriver-manager has a main help option: `webdriver-manager help`. There are also other built in help menus for each of the commands. So for example, if you would like to look up all the flag options you can set in `update`, you could run `webdriver-manager update help`.
|
|
61
|
+
|
|
62
|
+
Here are a list of all the commands with help:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
webdriver-manager update help
|
|
66
|
+
webdriver-manager start help
|
|
67
|
+
webdriver-manager clean help
|
|
68
|
+
webdriver-manager status help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Other topics:
|
|
72
|
+
--------------
|
|
73
|
+
|
|
74
|
+
- [mobile browser support](docs/mobile.md)
|
|
75
|
+
- [protractor support](docs/protractor.md)
|
|
76
|
+
- [set specific versions](docs/versions.md)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
var path = require('path');
|
|
4
|
+
var fs = require('fs');
|
|
5
|
+
var cwd = process.cwd();
|
|
6
|
+
|
|
7
|
+
var nodeModuleName = 'webdriver-manager';
|
|
8
|
+
var localInstall = path.resolve(cwd, 'node_modules', nodeModuleName);
|
|
9
|
+
var parentPath = path.resolve(cwd, '..');
|
|
10
|
+
var dir = __dirname;
|
|
11
|
+
var folder = cwd.replace(parentPath, '').substring(1);
|
|
12
|
+
|
|
13
|
+
var isProjectVersion = folder === nodeModuleName;
|
|
14
|
+
var isLocalVersion = false;
|
|
15
|
+
|
|
16
|
+
var printCyan, printMagenta, printGreen;
|
|
17
|
+
|
|
18
|
+
printCyan = printMagenta = printGreen = function(message) {
|
|
19
|
+
return message;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
var chalk = require('chalk');
|
|
24
|
+
printMagenta = chalk.magenta;
|
|
25
|
+
printCyan = chalk.cyan;
|
|
26
|
+
printGreen = chalk.green;
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
console.log("Error loading chalk, output will be boring.");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
isLocalVersion = fs.statSync(localInstall).isDirectory();
|
|
34
|
+
} catch(e) {
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// project version
|
|
38
|
+
if (folder === nodeModuleName) {
|
|
39
|
+
console.log(nodeModuleName + ': using ' + printMagenta('project version ' +
|
|
40
|
+
require(path.resolve('package.json')).version));
|
|
41
|
+
require(path.resolve('built/lib/webdriver'));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// local version
|
|
45
|
+
else if (isLocalVersion) {
|
|
46
|
+
console.log(nodeModuleName + ': using ' + printCyan('local installed version ' +
|
|
47
|
+
require(path.resolve(localInstall, 'package.json')).version));
|
|
48
|
+
require(path.resolve(localInstall, 'built/lib/webdriver'));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// global version
|
|
52
|
+
else {
|
|
53
|
+
console.log(nodeModuleName + ': using ' + printGreen('global installed version ' +
|
|
54
|
+
require(path.resolve(dir, '../package.json')).version));
|
|
55
|
+
require(path.resolve(dir, '../built/lib/webdriver'));
|
|
56
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"webdriverVersions": {
|
|
3
|
+
"selenium": "2.53.1",
|
|
4
|
+
"chromedriver": "2.27",
|
|
5
|
+
"maxChromedriver": "77",
|
|
6
|
+
"geckodriver": "v0.13.0",
|
|
7
|
+
"iedriver": "2.53.1",
|
|
8
|
+
"androidsdk": "24.4.1",
|
|
9
|
+
"appium": "1.6.5"
|
|
10
|
+
},
|
|
11
|
+
"cdnUrls": {
|
|
12
|
+
"selenium": "https://selenium-release.storage.googleapis.com/",
|
|
13
|
+
"chromedriver": "https://chromedriver.storage.googleapis.com/",
|
|
14
|
+
"geckodriver": "https://github.com/mozilla/geckodriver/releases/download/",
|
|
15
|
+
"iedriver": "https://selenium-release.storage.googleapis.com/",
|
|
16
|
+
"androidsdk": "http://dl.google.com/android/"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Binary, BinaryUrl, OS } from './binary';
|
|
2
|
+
/**
|
|
3
|
+
* The android sdk binary.
|
|
4
|
+
*/
|
|
5
|
+
export declare class AndroidSDK extends Binary {
|
|
6
|
+
static os: OS[];
|
|
7
|
+
static id: string;
|
|
8
|
+
static versionDefault: string;
|
|
9
|
+
static isDefault: boolean;
|
|
10
|
+
static DEFAULT_API_LEVELS: string;
|
|
11
|
+
static DEFAULT_ARCHITECTURES: string;
|
|
12
|
+
static DEFAULT_PLATFORMS: string;
|
|
13
|
+
static VERSIONS: {
|
|
14
|
+
[api_level: number]: string;
|
|
15
|
+
};
|
|
16
|
+
constructor(alternateCDN?: string);
|
|
17
|
+
id(): string;
|
|
18
|
+
prefix(): string;
|
|
19
|
+
suffix(): string;
|
|
20
|
+
getUrl(): Promise<BinaryUrl>;
|
|
21
|
+
getVersionList(): Promise<string[]>;
|
|
22
|
+
url(ostype: string): string;
|
|
23
|
+
zipContentName(): string;
|
|
24
|
+
executableSuffix(): string;
|
|
25
|
+
remove(sdkPath: string): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const rimraf = require("rimraf");
|
|
5
|
+
const config_1 = require("../config");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const binary_1 = require("./binary");
|
|
8
|
+
function getAndroidArch() {
|
|
9
|
+
switch (config_1.Config.osArch()) {
|
|
10
|
+
case 'arm':
|
|
11
|
+
return 'armeabi-v7a';
|
|
12
|
+
case 'arm64':
|
|
13
|
+
return 'arm64-v8a';
|
|
14
|
+
case 'x86':
|
|
15
|
+
case 'x32':
|
|
16
|
+
case 'ia32':
|
|
17
|
+
case 'ppc':
|
|
18
|
+
return 'x86';
|
|
19
|
+
case 'x86-64':
|
|
20
|
+
case 'x64':
|
|
21
|
+
case 'ia64':
|
|
22
|
+
case 'ppc64':
|
|
23
|
+
return 'x86_64';
|
|
24
|
+
default:
|
|
25
|
+
return config_1.Config.osArch();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The android sdk binary.
|
|
30
|
+
*/
|
|
31
|
+
class AndroidSDK extends binary_1.Binary {
|
|
32
|
+
constructor(alternateCDN) {
|
|
33
|
+
super(alternateCDN || config_1.Config.cdnUrls().android);
|
|
34
|
+
this.name = 'android-sdk';
|
|
35
|
+
this.versionCustom = AndroidSDK.versionDefault;
|
|
36
|
+
}
|
|
37
|
+
id() {
|
|
38
|
+
return AndroidSDK.id;
|
|
39
|
+
}
|
|
40
|
+
prefix() {
|
|
41
|
+
return 'android-sdk_r';
|
|
42
|
+
}
|
|
43
|
+
suffix() {
|
|
44
|
+
if (this.ostype === 'Darwin') {
|
|
45
|
+
return '-macosx.zip';
|
|
46
|
+
}
|
|
47
|
+
else if (this.ostype === 'Linux') {
|
|
48
|
+
return '-linux.tgz';
|
|
49
|
+
}
|
|
50
|
+
else if (this.ostype === 'Windows_NT') {
|
|
51
|
+
return '-windows.zip';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
getUrl() {
|
|
55
|
+
return Promise.resolve({ url: this.cdn + this.filename(), version: this.versionCustom });
|
|
56
|
+
}
|
|
57
|
+
getVersionList() {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
url(ostype) {
|
|
61
|
+
return this.cdn + this.filename();
|
|
62
|
+
}
|
|
63
|
+
zipContentName() {
|
|
64
|
+
if (this.ostype === 'Darwin') {
|
|
65
|
+
return this.name + '-macosx';
|
|
66
|
+
}
|
|
67
|
+
else if (this.ostype === 'Linux') {
|
|
68
|
+
return this.name + '-linux';
|
|
69
|
+
}
|
|
70
|
+
else if (this.ostype === 'Windows_NT') {
|
|
71
|
+
return this.name + '-windows';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
executableSuffix() {
|
|
75
|
+
return '';
|
|
76
|
+
}
|
|
77
|
+
remove(sdkPath) {
|
|
78
|
+
try {
|
|
79
|
+
let avds = require(path.resolve(sdkPath, 'available_avds.json'));
|
|
80
|
+
let version = path.basename(sdkPath).slice(this.prefix().length);
|
|
81
|
+
avds.forEach((avd) => {
|
|
82
|
+
utils_1.spawnSync(path.resolve(sdkPath, 'tools', 'android'), ['delete', 'avd', '-n', avd + '-v' + version + '-wd-manager']);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
}
|
|
87
|
+
rimraf.sync(sdkPath);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
AndroidSDK.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin];
|
|
91
|
+
AndroidSDK.id = 'android';
|
|
92
|
+
AndroidSDK.versionDefault = config_1.Config.binaryVersions().android;
|
|
93
|
+
AndroidSDK.isDefault = false;
|
|
94
|
+
AndroidSDK.DEFAULT_API_LEVELS = '24';
|
|
95
|
+
AndroidSDK.DEFAULT_ARCHITECTURES = getAndroidArch();
|
|
96
|
+
AndroidSDK.DEFAULT_PLATFORMS = 'google_apis';
|
|
97
|
+
AndroidSDK.VERSIONS = {
|
|
98
|
+
// Before 24 is not supported
|
|
99
|
+
24: '7.0',
|
|
100
|
+
25: '7.1'
|
|
101
|
+
};
|
|
102
|
+
exports.AndroidSDK = AndroidSDK;
|
|
103
|
+
//# sourceMappingURL=android_sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"android_sdk.js","sourceRoot":"","sources":["../../../lib/binaries/android_sdk.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Binary, BinaryUrl, OS } from './binary';
|
|
2
|
+
/**
|
|
3
|
+
* The appium binary.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Appium extends Binary {
|
|
6
|
+
static os: OS[];
|
|
7
|
+
static id: string;
|
|
8
|
+
static versionDefault: string;
|
|
9
|
+
static isDefault: boolean;
|
|
10
|
+
constructor(alternateCDN?: string);
|
|
11
|
+
id(): string;
|
|
12
|
+
prefix(): string;
|
|
13
|
+
suffix(): string;
|
|
14
|
+
executableSuffix(): string;
|
|
15
|
+
getUrl(version?: string): Promise<BinaryUrl>;
|
|
16
|
+
getVersionList(): Promise<string[]>;
|
|
17
|
+
remove(sdkPath: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rimraf = require("rimraf");
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
const binary_1 = require("./binary");
|
|
6
|
+
/**
|
|
7
|
+
* The appium binary.
|
|
8
|
+
*/
|
|
9
|
+
class Appium extends binary_1.Binary {
|
|
10
|
+
constructor(alternateCDN) {
|
|
11
|
+
super(alternateCDN || config_1.Config.cdnUrls().appium);
|
|
12
|
+
this.name = 'appium';
|
|
13
|
+
this.versionCustom = Appium.versionDefault;
|
|
14
|
+
}
|
|
15
|
+
id() {
|
|
16
|
+
return Appium.id;
|
|
17
|
+
}
|
|
18
|
+
prefix() {
|
|
19
|
+
return 'appium-';
|
|
20
|
+
}
|
|
21
|
+
suffix() {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
executableSuffix() {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
getUrl(version) {
|
|
28
|
+
return Promise.resolve({ url: '', version: this.versionCustom });
|
|
29
|
+
}
|
|
30
|
+
getVersionList() {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
remove(sdkPath) {
|
|
34
|
+
rimraf.sync(sdkPath);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
Appium.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin];
|
|
38
|
+
Appium.id = 'appium';
|
|
39
|
+
Appium.versionDefault = config_1.Config.binaryVersions().appium;
|
|
40
|
+
Appium.isDefault = false;
|
|
41
|
+
exports.Appium = Appium;
|
|
42
|
+
//# sourceMappingURL=appium.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appium.js","sourceRoot":"","sources":["../../../lib/binaries/appium.ts"],"names":[],"mappings":";;AACA,iCAAiC;AAEjC,sCAAiC;AAEjC,qCAA+C;AAG/C;;GAEG;AACH,YAAoB,SAAQ,eAAM;IAMhC,YAAY,YAAqB;QAC/B,KAAK,CAAC,YAAY,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC;IAC7C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,SAAS,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAED,gBAAgB;QACd,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,OAAgB;QACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAC,CAAC,CAAC;IACjE,CAAC;IAED,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;;AArCM,SAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,SAAE,GAAG,QAAQ,CAAC;AACd,qBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC;AAChD,gBAAS,GAAG,KAAK,CAAC;AAJ3B,wBAuCC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ConfigSource } from './config_source';
|
|
2
|
+
/**
|
|
3
|
+
* operating system enum
|
|
4
|
+
*/
|
|
5
|
+
export declare enum OS {
|
|
6
|
+
Windows_NT = 0,
|
|
7
|
+
Linux = 1,
|
|
8
|
+
Darwin = 2,
|
|
9
|
+
}
|
|
10
|
+
export interface BinaryUrl {
|
|
11
|
+
url: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Dictionary to map the binary's id to the binary object
|
|
16
|
+
*/
|
|
17
|
+
export interface BinaryMap<T extends Binary> {
|
|
18
|
+
[id: string]: T;
|
|
19
|
+
}
|
|
20
|
+
export declare abstract class Binary {
|
|
21
|
+
static os: OS[];
|
|
22
|
+
configSource: ConfigSource;
|
|
23
|
+
ostype: string;
|
|
24
|
+
osarch: string;
|
|
25
|
+
alternativeDownloadUrl: string;
|
|
26
|
+
cdn: string;
|
|
27
|
+
name: string;
|
|
28
|
+
versionDefault: string;
|
|
29
|
+
versionCustom: string;
|
|
30
|
+
constructor(opt_alternativeCdn?: string);
|
|
31
|
+
abstract prefix(): string;
|
|
32
|
+
abstract suffix(): string;
|
|
33
|
+
executableSuffix(): string;
|
|
34
|
+
version(): string;
|
|
35
|
+
filename(): string;
|
|
36
|
+
/**
|
|
37
|
+
* @param ostype The operating system.
|
|
38
|
+
* @returns The file name for the executable.
|
|
39
|
+
*/
|
|
40
|
+
executableFilename(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Gets the id of the binary.
|
|
43
|
+
*/
|
|
44
|
+
abstract id(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the url to download the file set by the version. This will use the XML if available.
|
|
47
|
+
* If not, it will download from an existing url.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} version The version we are looking for. This could also be 'latest'.
|
|
50
|
+
*/
|
|
51
|
+
getUrl(version?: string): Promise<BinaryUrl>;
|
|
52
|
+
/**
|
|
53
|
+
* Gets the list of available versions available based on the xml. If no XML exists, return an
|
|
54
|
+
* empty list.
|
|
55
|
+
*/
|
|
56
|
+
abstract getVersionList(): Promise<string[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Delete an instance of this binary from the file system
|
|
59
|
+
*/
|
|
60
|
+
remove(filename: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* @param ostype The operating system.
|
|
63
|
+
* @returns The file name for the file inside the downloaded zip file
|
|
64
|
+
*/
|
|
65
|
+
zipContentName(): string;
|
|
66
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
/**
|
|
6
|
+
* operating system enum
|
|
7
|
+
*/
|
|
8
|
+
var OS;
|
|
9
|
+
(function (OS) {
|
|
10
|
+
OS[OS["Windows_NT"] = 0] = "Windows_NT";
|
|
11
|
+
OS[OS["Linux"] = 1] = "Linux";
|
|
12
|
+
OS[OS["Darwin"] = 2] = "Darwin";
|
|
13
|
+
})(OS = exports.OS || (exports.OS = {}));
|
|
14
|
+
class Binary {
|
|
15
|
+
constructor(opt_alternativeCdn) {
|
|
16
|
+
this.ostype = config_1.Config.osType();
|
|
17
|
+
this.osarch = config_1.Config.osArch();
|
|
18
|
+
this.cdn = opt_alternativeCdn;
|
|
19
|
+
}
|
|
20
|
+
executableSuffix() {
|
|
21
|
+
if (this.ostype == 'Windows_NT') {
|
|
22
|
+
return '.exe';
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
version() {
|
|
29
|
+
return this.versionCustom;
|
|
30
|
+
}
|
|
31
|
+
filename() {
|
|
32
|
+
return this.prefix() + this.version() + this.suffix();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @param ostype The operating system.
|
|
36
|
+
* @returns The file name for the executable.
|
|
37
|
+
*/
|
|
38
|
+
executableFilename() {
|
|
39
|
+
return this.prefix() + this.version() + this.executableSuffix();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Gets the url to download the file set by the version. This will use the XML if available.
|
|
43
|
+
* If not, it will download from an existing url.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} version The version we are looking for. This could also be 'latest'.
|
|
46
|
+
*/
|
|
47
|
+
getUrl(version) {
|
|
48
|
+
if (this.alternativeDownloadUrl != null) {
|
|
49
|
+
return Promise.resolve({ url: '', version: '' });
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return this.getVersionList().then(() => {
|
|
53
|
+
version = version || config_1.Config.binaryVersions()[this.id()];
|
|
54
|
+
return this.configSource.getUrl(version).then(binaryUrl => {
|
|
55
|
+
this.versionCustom = binaryUrl.version;
|
|
56
|
+
return { url: binaryUrl.url, version: binaryUrl.version };
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Delete an instance of this binary from the file system
|
|
63
|
+
*/
|
|
64
|
+
remove(filename) {
|
|
65
|
+
fs.unlinkSync(filename);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @param ostype The operating system.
|
|
69
|
+
* @returns The file name for the file inside the downloaded zip file
|
|
70
|
+
*/
|
|
71
|
+
zipContentName() {
|
|
72
|
+
return this.name + this.executableSuffix();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.Binary = Binary;
|
|
76
|
+
//# sourceMappingURL=binary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../../lib/binaries/binary.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,sCAAiC;AAGjC;;GAEG;AACH,IAAY,EAIX;AAJD,WAAY,EAAE;IACZ,uCAAU,CAAA;IACV,6BAAK,CAAA;IACL,+BAAM,CAAA;AACR,CAAC,EAJW,EAAE,GAAF,UAAE,KAAF,UAAE,QAIb;AAYD;IAmBE,YAAY,kBAA2B;QAdvC,WAAM,GAAW,eAAM,CAAC,MAAM,EAAE,CAAC;QACjC,WAAM,GAAW,eAAM,CAAC,MAAM,EAAE,CAAC;QAc/B,IAAI,CAAC,GAAG,GAAG,kBAAkB,CAAC;IAChC,CAAC;IAKD,gBAAgB;QACd,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,MAAM,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,QAAQ;QACN,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IACxD,CAAC;IAED;;;OAGG;IACH,kBAAkB;QAChB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAClE,CAAC;IAOD;;;;;OAKG;IACH,MAAM,CAAC,OAAgB;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC,CAAC;QACjD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC;gBAChC,OAAO,GAAG,OAAO,IAAI,eAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS;oBACrD,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC;oBACvC,MAAM,CAAC,EAAC,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAC,CAAC;gBAC1D,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAQD;;OAEG;IACH,MAAM,CAAC,QAAgB;QACrB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC7C,CAAC;CACF;AA/FD,wBA+FC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Binary, OS } from './binary';
|
|
2
|
+
export declare class ChromeDriver extends Binary {
|
|
3
|
+
static id: string;
|
|
4
|
+
static isDefault: boolean;
|
|
5
|
+
static os: OS[];
|
|
6
|
+
static versionDefault: string;
|
|
7
|
+
constructor(opt_alternativeCdn?: string);
|
|
8
|
+
id(): string;
|
|
9
|
+
prefix(): string;
|
|
10
|
+
suffix(): string;
|
|
11
|
+
getVersionList(): Promise<string[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("../config");
|
|
4
|
+
const binary_1 = require("./binary");
|
|
5
|
+
const chrome_xml_1 = require("./chrome_xml");
|
|
6
|
+
class ChromeDriver extends binary_1.Binary {
|
|
7
|
+
constructor(opt_alternativeCdn) {
|
|
8
|
+
super(opt_alternativeCdn || config_1.Config.cdnUrls().chrome);
|
|
9
|
+
this.configSource = new chrome_xml_1.ChromeXml();
|
|
10
|
+
this.name = 'chromedriver';
|
|
11
|
+
this.versionDefault = ChromeDriver.versionDefault;
|
|
12
|
+
this.versionCustom = this.versionDefault;
|
|
13
|
+
}
|
|
14
|
+
id() {
|
|
15
|
+
return ChromeDriver.id;
|
|
16
|
+
}
|
|
17
|
+
prefix() {
|
|
18
|
+
return 'chromedriver_';
|
|
19
|
+
}
|
|
20
|
+
suffix() {
|
|
21
|
+
return '.zip';
|
|
22
|
+
}
|
|
23
|
+
getVersionList() {
|
|
24
|
+
// If an alternative cdn is set, return an empty list.
|
|
25
|
+
if (this.alternativeDownloadUrl != null) {
|
|
26
|
+
Promise.resolve([]);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return this.configSource.getVersionList();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
ChromeDriver.id = 'chrome';
|
|
34
|
+
ChromeDriver.isDefault = true;
|
|
35
|
+
ChromeDriver.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin];
|
|
36
|
+
ChromeDriver.versionDefault = config_1.Config.binaryVersions().chrome;
|
|
37
|
+
exports.ChromeDriver = ChromeDriver;
|
|
38
|
+
//# sourceMappingURL=chrome_driver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome_driver.js","sourceRoot":"","sources":["../../../lib/binaries/chrome_driver.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAC/C,6CAAuC;AAEvC,kBAA0B,SAAQ,eAAM;IAMtC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAS,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;QAClD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,eAAe,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,sDAAsD;QACtD,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AAhCM,eAAE,GAAG,QAAQ,CAAC;AACd,sBAAS,GAAG,IAAI,CAAC;AACjB,eAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,2BAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC;AAJzD,oCAkCC"}
|