selenium-webdriver 3.6.0 → 4.0.0-alpha.1
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/CHANGES.md +181 -0
- package/README.md +25 -27
- package/chrome.js +113 -127
- package/edge.js +42 -117
- package/example/chrome_android.js +8 -8
- package/example/chrome_mobile_emulation.js +8 -8
- package/example/firefox_channels.js +22 -18
- package/example/google_search_test.js +39 -26
- package/example/logging.js +39 -6
- package/firefox.js +769 -0
- package/http/index.js +41 -4
- package/http/util.js +11 -6
- package/ie.js +56 -97
- package/index.js +178 -114
- package/jasmine.json +11 -0
- package/lib/actions.js +68 -63
- package/lib/by.js +1 -1
- package/lib/capabilities.js +255 -192
- package/lib/command.js +26 -50
- package/lib/error.js +85 -44
- package/lib/http.js +133 -110
- package/lib/input.js +1044 -8
- package/lib/promise.js +222 -3323
- package/lib/proxy.js +134 -39
- package/lib/test/bootstrap_jasmine.js +28 -0
- package/lib/test/data/actions/click.html +24 -0
- package/lib/test/data/actions/drag.html +77 -0
- package/lib/test/data/actions/record_click.html +21 -0
- package/lib/test/data/chrome/download.html +2 -0
- package/lib/test/data/inputs.html +42 -0
- package/lib/test/data/selectPage.html +12 -0
- package/lib/test/data/simpleTest.html +5 -0
- package/lib/test/data/upload_invisible.html +45 -0
- package/lib/test/fileserver.js +23 -19
- package/lib/test/index.js +30 -212
- package/lib/test/resources.js +0 -1
- package/lib/webdriver.js +675 -936
- package/net/index.js +21 -25
- package/net/portprober.js +51 -68
- package/package.json +5 -3
- package/remote/index.js +5 -19
- package/safari.js +41 -128
- package/test/actions_test.js +173 -18
- package/test/{session_test.js → builder_test.js} +44 -37
- package/test/chrome/devtools_test.js +93 -0
- package/test/chrome/options_test.js +48 -154
- package/test/chrome/service_test.js +7 -7
- package/test/cookie_test.js +77 -63
- package/test/element_finding_test.js +206 -201
- package/test/execute_script_test.js +115 -114
- package/test/fingerprint_test.js +16 -15
- package/test/firefox_test.js +251 -0
- package/test/http/http_test.js +0 -1
- package/test/http/util_test.js +2 -2
- package/test/io/zip_test.js +6 -7
- package/test/lib/error_test.js +34 -7
- package/test/lib/http_test.js +8 -128
- package/test/lib/input_test.js +1379 -0
- package/test/lib/promise_test.js +473 -908
- package/test/lib/webdriver_test.js +296 -868
- package/test/logging_test.js +37 -43
- package/test/page_loading_test.js +71 -81
- package/test/proxy_test.js +64 -72
- package/test/rect_test.js +14 -25
- package/test/remote_test.js +10 -29
- package/test/safari_test.js +7 -71
- package/test/stale_element_test.js +20 -23
- package/test/tag_name_test.js +10 -9
- package/test/upload_test.js +27 -35
- package/test/window_test.js +72 -85
- package/testing/index.js +386 -314
- package/.npmignore +0 -2
- package/example/async_await_test.js +0 -69
- package/example/google_search_generator.js +0 -47
- package/example/parallel_flows.js +0 -51
- package/firefox/binary.js +0 -347
- package/firefox/extension.js +0 -224
- package/firefox/index.js +0 -576
- package/firefox/profile.js +0 -311
- package/lib/events.js +0 -210
- package/lib/test/data/firefox/jetpack-sample.xpi +0 -0
- package/lib/test/data/firefox/sample.xpi +0 -0
- package/lib/test/promise.js +0 -79
- package/opera.js +0 -405
- package/phantomjs.js +0 -282
- package/test/firefox/extension_test.js +0 -120
- package/test/firefox/firefox_test.js +0 -244
- package/test/firefox/profile_test.js +0 -140
- package/test/lib/events_test.js +0 -177
- package/test/lib/promise_aplus_test.js +0 -78
- package/test/lib/promise_error_test.js +0 -884
- package/test/lib/promise_flow_test.js +0 -2288
- package/test/lib/promise_generator_test.js +0 -310
- package/test/phantomjs/execute_phantomjs_test.js +0 -59
- package/test/testing/assert_test.js +0 -373
- package/test/testing/index_test.js +0 -224
- package/testing/assert.js +0 -378
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
'use strict';
|
|
19
|
-
|
|
20
|
-
const promise = require('../../lib/promise');
|
|
21
|
-
const {enablePromiseManager} = require('../../lib/test/promise');
|
|
22
|
-
|
|
23
|
-
describe('Promises/A+ Compliance Tests', function() {
|
|
24
|
-
enablePromiseManager(() => {
|
|
25
|
-
// The promise spec does not define behavior for unhandled rejections and
|
|
26
|
-
// assumes they are effectively swallowed. This is not the case with our
|
|
27
|
-
// implementation, so we have to disable error propagation to test that the
|
|
28
|
-
// rest of our behavior is compliant.
|
|
29
|
-
// We run the tests with a separate instance of the control flow to ensure
|
|
30
|
-
// disablign error propagation does not impact other tests.
|
|
31
|
-
var flow = new promise.ControlFlow();
|
|
32
|
-
flow.setPropagateUnhandledRejections(false);
|
|
33
|
-
|
|
34
|
-
// Skip the tests in 2.2.6.1/2. We are not compliant in these scenarios.
|
|
35
|
-
var realDescribe = global.describe;
|
|
36
|
-
global.describe = function(name, fn) {
|
|
37
|
-
realDescribe(name, function() {
|
|
38
|
-
var prefix = 'Promises/A+ Compliance Tests '
|
|
39
|
-
+ 'SELENIUM_PROMISE_MANAGER=true 2.2.6: '
|
|
40
|
-
+ '`then` may be called multiple times on the same promise.';
|
|
41
|
-
var suffix = 'even when one handler is added inside another handler';
|
|
42
|
-
if (this.fullTitle().startsWith(prefix)
|
|
43
|
-
&& this.fullTitle().endsWith(suffix)) {
|
|
44
|
-
var realSpecify = global.specify;
|
|
45
|
-
try {
|
|
46
|
-
global.specify = function(name) {
|
|
47
|
-
realSpecify(name);
|
|
48
|
-
};
|
|
49
|
-
fn();
|
|
50
|
-
} finally {
|
|
51
|
-
global.specify = realSpecify;
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
fn();
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
require('promises-aplus-tests').mocha({
|
|
60
|
-
resolved: function(value) {
|
|
61
|
-
return new promise.Promise((fulfill) => fulfill(value), flow);
|
|
62
|
-
},
|
|
63
|
-
rejected: function(error) {
|
|
64
|
-
return new promise.Promise((_, reject) => reject(error), flow);
|
|
65
|
-
},
|
|
66
|
-
deferred: function() {
|
|
67
|
-
var d = new promise.Deferred(flow);
|
|
68
|
-
return {
|
|
69
|
-
resolve: d.fulfill,
|
|
70
|
-
reject: d.reject,
|
|
71
|
-
promise: d.promise
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
global.describe = realDescribe;
|
|
77
|
-
});
|
|
78
|
-
});
|