selenium-webdriver 4.50.0 → 4.52.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.
- checksums.yaml +4 -4
- data/CHANGES +22 -0
- data/Gemfile +14 -0
- data/README.md +20 -0
- data/bin/linux-arm64/selenium-manager +0 -0
- data/bin/linux-x86_64/selenium-manager +0 -0
- data/bin/macos/selenium-manager +0 -0
- data/bin/selenium-manager-THIRD-PARTY-NOTICES.txt +544 -227
- data/bin/selenium-manager.cdx.json +810 -728
- data/bin/windows/selenium-manager.exe +0 -0
- data/lib/selenium/webdriver/atoms/findElements.js +961 -248
- data/lib/selenium/webdriver/atoms/getAttribute.js +154 -125
- data/lib/selenium/webdriver/atoms/isDisplayed.js +434 -362
- data/lib/selenium/webdriver/atoms.rb +4 -1
- data/lib/selenium/webdriver/bidi/protocol/bluetooth.rb +6 -6
- data/lib/selenium/webdriver/bidi/protocol/browser.rb +21 -9
- data/lib/selenium/webdriver/bidi/protocol/browsing_context.rb +109 -39
- data/lib/selenium/webdriver/bidi/protocol/emulation.rb +89 -44
- data/lib/selenium/webdriver/bidi/protocol/input.rb +95 -31
- data/lib/selenium/webdriver/bidi/protocol/log.rb +4 -4
- data/lib/selenium/webdriver/bidi/protocol/moz_debugging.rb +12 -10
- data/lib/selenium/webdriver/bidi/protocol/moz_profiler.rb +4 -4
- data/lib/selenium/webdriver/bidi/protocol/network.rb +82 -39
- data/lib/selenium/webdriver/bidi/protocol/script.rb +39 -25
- data/lib/selenium/webdriver/bidi/protocol/session.rb +82 -28
- data/lib/selenium/webdriver/bidi/protocol/storage.rb +3 -3
- data/lib/selenium/webdriver/bidi/protocol/user_agent_client_hints.rb +3 -3
- data/lib/selenium/webdriver/bidi/protocol/web_extension.rb +17 -9
- data/lib/selenium/webdriver/bidi/serialization/record.rb +92 -17
- data/lib/selenium/webdriver/bidi/serialization.rb +2 -2
- data/lib/selenium/webdriver/bidi/support/bidi_generate.rb +241 -143
- data/lib/selenium/webdriver/common/client_config.rb +4 -1
- data/lib/selenium/webdriver/common/driver_finder.rb +5 -2
- data/lib/selenium/webdriver/common/websocket_connection.rb +51 -13
- data/lib/selenium/webdriver/remote/http/default.rb +17 -1
- data/lib/selenium/webdriver/version.rb +1 -1
- data/selenium-webdriver.gemspec +0 -12
- metadata +6 -163
|
@@ -1,152 +1,181 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function () {
|
|
2
|
+
var __seleniumAtom = (() => {
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// javascript/atoms/typescript/get-attribute.ts
|
|
22
|
+
var get_attribute_exports = {};
|
|
23
|
+
__export(get_attribute_exports, {
|
|
24
|
+
default: () => get_attribute_default
|
|
25
|
+
});
|
|
26
|
+
function get(element, attribute) {
|
|
2
27
|
const PROPERTY_ALIASES = {
|
|
3
|
-
|
|
4
|
-
|
|
28
|
+
"class": "className",
|
|
29
|
+
"readonly": "readOnly"
|
|
5
30
|
};
|
|
6
|
-
const BOOLEAN_PROPERTIES = new Set([
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
31
|
+
const BOOLEAN_PROPERTIES = /* @__PURE__ */ new Set([
|
|
32
|
+
"allowfullscreen",
|
|
33
|
+
"allowpaymentrequest",
|
|
34
|
+
"allowusermedia",
|
|
35
|
+
"async",
|
|
36
|
+
"autofocus",
|
|
37
|
+
"autoplay",
|
|
38
|
+
"checked",
|
|
39
|
+
"compact",
|
|
40
|
+
"complete",
|
|
41
|
+
"controls",
|
|
42
|
+
"declare",
|
|
43
|
+
"default",
|
|
44
|
+
"defaultchecked",
|
|
45
|
+
"defaultselected",
|
|
46
|
+
"defer",
|
|
47
|
+
"disabled",
|
|
48
|
+
"ended",
|
|
49
|
+
"formnovalidate",
|
|
50
|
+
"hidden",
|
|
51
|
+
"indeterminate",
|
|
52
|
+
"iscontenteditable",
|
|
53
|
+
"ismap",
|
|
54
|
+
"itemscope",
|
|
55
|
+
"loop",
|
|
56
|
+
"multiple",
|
|
57
|
+
"muted",
|
|
58
|
+
"nohref",
|
|
59
|
+
"nomodule",
|
|
60
|
+
"noresize",
|
|
61
|
+
"noshade",
|
|
62
|
+
"novalidate",
|
|
63
|
+
"nowrap",
|
|
64
|
+
"open",
|
|
65
|
+
"paused",
|
|
66
|
+
"playsinline",
|
|
67
|
+
"pubdate",
|
|
68
|
+
"readonly",
|
|
69
|
+
"required",
|
|
70
|
+
"reversed",
|
|
71
|
+
"scoped",
|
|
72
|
+
"seamless",
|
|
73
|
+
"seeking",
|
|
74
|
+
"selected",
|
|
75
|
+
"truespeed",
|
|
76
|
+
"typemustmatch",
|
|
77
|
+
"willvalidate"
|
|
53
78
|
]);
|
|
54
|
-
function getAttribute(
|
|
55
|
-
|
|
79
|
+
function getAttribute(element2, attributeName) {
|
|
80
|
+
return element2.getAttribute(attributeName.toLowerCase());
|
|
56
81
|
}
|
|
57
|
-
function getProperty(
|
|
58
|
-
|
|
82
|
+
function getProperty(element2, propertyName) {
|
|
83
|
+
return element2[propertyName];
|
|
59
84
|
}
|
|
60
85
|
function isElement(node, tagName) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
if (!tagName) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
const normalizedTag = tagName.toUpperCase();
|
|
69
|
-
if (node instanceof HTMLFormElement) {
|
|
70
|
-
return normalizedTag === 'FORM';
|
|
71
|
-
}
|
|
72
|
-
return typeof elem.tagName === 'string' && elem.tagName.toUpperCase() === normalizedTag;
|
|
73
|
-
}
|
|
74
|
-
function isSelectable(element) {
|
|
75
|
-
if (isElement(element, 'OPTION')) {
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
if (isElement(element, 'INPUT')) {
|
|
79
|
-
const type = element.type.toLowerCase();
|
|
80
|
-
return type === 'checkbox' || type === 'radio';
|
|
81
|
-
}
|
|
86
|
+
const elem = node;
|
|
87
|
+
if (!elem || elem.nodeType !== 1) {
|
|
82
88
|
return false;
|
|
89
|
+
}
|
|
90
|
+
if (!tagName) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
const normalizedTag = tagName.toUpperCase();
|
|
94
|
+
if (node instanceof HTMLFormElement) {
|
|
95
|
+
return normalizedTag === "FORM";
|
|
96
|
+
}
|
|
97
|
+
return typeof elem.tagName === "string" && elem.tagName.toUpperCase() === normalizedTag;
|
|
83
98
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const type =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
function isSelectable(element2) {
|
|
100
|
+
if (isElement(element2, "OPTION")) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
if (isElement(element2, "INPUT")) {
|
|
104
|
+
const type = element2.type.toLowerCase();
|
|
105
|
+
return type === "checkbox" || type === "radio";
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
function isSelected(element2) {
|
|
110
|
+
var _a;
|
|
111
|
+
if (isElement(element2, "OPTION")) {
|
|
112
|
+
return element2.selected;
|
|
113
|
+
}
|
|
114
|
+
const type = (_a = element2.type) == null ? void 0 : _a.toLowerCase();
|
|
115
|
+
if (type === "checkbox" || type === "radio") {
|
|
116
|
+
return element2.checked;
|
|
117
|
+
}
|
|
118
|
+
return false;
|
|
94
119
|
}
|
|
95
120
|
function isObject(value) {
|
|
96
|
-
|
|
121
|
+
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
97
122
|
}
|
|
98
123
|
const name = attribute.toLowerCase();
|
|
99
|
-
if (name ===
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
if (name === "style") {
|
|
125
|
+
const style = element.style;
|
|
126
|
+
if (!style) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
return typeof style === "string" ? style : style.cssText;
|
|
105
130
|
}
|
|
106
|
-
if ((name ===
|
|
107
|
-
|
|
131
|
+
if ((name === "selected" || name === "checked") && isSelectable(element)) {
|
|
132
|
+
return isSelected(element) ? "true" : null;
|
|
108
133
|
}
|
|
109
|
-
const isLink = isElement(element,
|
|
110
|
-
const isImg = isElement(element,
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
134
|
+
const isLink = isElement(element, "A");
|
|
135
|
+
const isImg = isElement(element, "IMG");
|
|
136
|
+
if (isImg && name === "src" || isLink && name === "href") {
|
|
137
|
+
const attrValue = getAttribute(element, name);
|
|
138
|
+
if (attrValue) {
|
|
139
|
+
return String(getProperty(element, name));
|
|
140
|
+
}
|
|
141
|
+
return attrValue;
|
|
117
142
|
}
|
|
118
|
-
if (name ===
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
if (lower === 'true') {
|
|
126
|
-
return 'true';
|
|
127
|
-
}
|
|
143
|
+
if (name === "spellcheck") {
|
|
144
|
+
const attrValue = getAttribute(element, name);
|
|
145
|
+
if (attrValue !== null) {
|
|
146
|
+
const lower = attrValue.toLowerCase();
|
|
147
|
+
if (lower === "false") {
|
|
148
|
+
return "false";
|
|
128
149
|
}
|
|
129
|
-
|
|
150
|
+
if (lower === "true") {
|
|
151
|
+
return "true";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return String(getProperty(element, name));
|
|
130
155
|
}
|
|
131
156
|
const propName = PROPERTY_ALIASES[name] || attribute;
|
|
132
157
|
if (BOOLEAN_PROPERTIES.has(name)) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
158
|
+
const hasAttr = element.getAttribute(name) !== null;
|
|
159
|
+
const propValue = getProperty(element, propName);
|
|
160
|
+
return hasAttr || !!propValue ? "true" : null;
|
|
136
161
|
}
|
|
137
|
-
if (name ===
|
|
138
|
-
|
|
139
|
-
|
|
162
|
+
if (name === "value" && isElement(element, "LI")) {
|
|
163
|
+
const attrValue = element.getAttribute(name);
|
|
164
|
+
return attrValue != null ? attrValue : null;
|
|
140
165
|
}
|
|
141
166
|
let property;
|
|
142
167
|
try {
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
catch (_e) {
|
|
168
|
+
property = getProperty(element, propName);
|
|
169
|
+
} catch (_e) {
|
|
146
170
|
}
|
|
147
171
|
if (property == null || isObject(property)) {
|
|
148
|
-
|
|
149
|
-
|
|
172
|
+
const attrValue = element.getAttribute(name);
|
|
173
|
+
return attrValue != null ? attrValue : null;
|
|
150
174
|
}
|
|
151
175
|
return property != null ? String(property) : null;
|
|
152
|
-
}
|
|
176
|
+
}
|
|
177
|
+
var get_attribute_default = get;
|
|
178
|
+
return __toCommonJS(get_attribute_exports);
|
|
179
|
+
})();
|
|
180
|
+
return __seleniumAtom.default;
|
|
181
|
+
})()
|