selenium-webdriver 4.51.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 +15 -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 +543 -226
- data/bin/selenium-manager.cdx.json +804 -722
- data/bin/windows/selenium-manager.exe +0 -0
- data/lib/selenium/webdriver/atoms/findElements.js +960 -250
- data/lib/selenium/webdriver/atoms/getAttribute.js +153 -127
- data/lib/selenium/webdriver/atoms/isDisplayed.js +433 -364
- 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 +38 -24
- data/lib/selenium/webdriver/bidi/protocol/session.rb +61 -8
- 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 +66 -24
- data/lib/selenium/webdriver/bidi/serialization.rb +2 -2
- data/lib/selenium/webdriver/bidi/support/bidi_generate.rb +228 -150
- 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,155 +1,181 @@
|
|
|
1
1
|
(function () {
|
|
2
|
-
|
|
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) {
|
|
3
27
|
const PROPERTY_ALIASES = {
|
|
4
|
-
|
|
5
|
-
|
|
28
|
+
"class": "className",
|
|
29
|
+
"readonly": "readOnly"
|
|
6
30
|
};
|
|
7
|
-
const BOOLEAN_PROPERTIES = new Set([
|
|
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
|
-
|
|
53
|
-
|
|
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"
|
|
54
78
|
]);
|
|
55
|
-
function getAttribute(
|
|
56
|
-
|
|
79
|
+
function getAttribute(element2, attributeName) {
|
|
80
|
+
return element2.getAttribute(attributeName.toLowerCase());
|
|
57
81
|
}
|
|
58
|
-
function getProperty(
|
|
59
|
-
|
|
82
|
+
function getProperty(element2, propertyName) {
|
|
83
|
+
return element2[propertyName];
|
|
60
84
|
}
|
|
61
85
|
function isElement(node, tagName) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
if (!tagName) {
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
const normalizedTag = tagName.toUpperCase();
|
|
70
|
-
if (node instanceof HTMLFormElement) {
|
|
71
|
-
return normalizedTag === 'FORM';
|
|
72
|
-
}
|
|
73
|
-
return typeof elem.tagName === 'string' && elem.tagName.toUpperCase() === normalizedTag;
|
|
74
|
-
}
|
|
75
|
-
function isSelectable(element) {
|
|
76
|
-
if (isElement(element, 'OPTION')) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
if (isElement(element, 'INPUT')) {
|
|
80
|
-
const type = element.type.toLowerCase();
|
|
81
|
-
return type === 'checkbox' || type === 'radio';
|
|
82
|
-
}
|
|
86
|
+
const elem = node;
|
|
87
|
+
if (!elem || elem.nodeType !== 1) {
|
|
83
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;
|
|
84
98
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const type =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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;
|
|
95
119
|
}
|
|
96
120
|
function isObject(value) {
|
|
97
|
-
|
|
121
|
+
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
98
122
|
}
|
|
99
123
|
const name = attribute.toLowerCase();
|
|
100
|
-
if (name ===
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
124
|
+
if (name === "style") {
|
|
125
|
+
const style = element.style;
|
|
126
|
+
if (!style) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
return typeof style === "string" ? style : style.cssText;
|
|
106
130
|
}
|
|
107
|
-
if ((name ===
|
|
108
|
-
|
|
131
|
+
if ((name === "selected" || name === "checked") && isSelectable(element)) {
|
|
132
|
+
return isSelected(element) ? "true" : null;
|
|
109
133
|
}
|
|
110
|
-
const isLink = isElement(element,
|
|
111
|
-
const isImg = isElement(element,
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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;
|
|
118
142
|
}
|
|
119
|
-
if (name ===
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
if (lower === 'true') {
|
|
127
|
-
return 'true';
|
|
128
|
-
}
|
|
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";
|
|
129
149
|
}
|
|
130
|
-
|
|
150
|
+
if (lower === "true") {
|
|
151
|
+
return "true";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return String(getProperty(element, name));
|
|
131
155
|
}
|
|
132
156
|
const propName = PROPERTY_ALIASES[name] || attribute;
|
|
133
157
|
if (BOOLEAN_PROPERTIES.has(name)) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
158
|
+
const hasAttr = element.getAttribute(name) !== null;
|
|
159
|
+
const propValue = getProperty(element, propName);
|
|
160
|
+
return hasAttr || !!propValue ? "true" : null;
|
|
137
161
|
}
|
|
138
|
-
if (name ===
|
|
139
|
-
|
|
140
|
-
|
|
162
|
+
if (name === "value" && isElement(element, "LI")) {
|
|
163
|
+
const attrValue = element.getAttribute(name);
|
|
164
|
+
return attrValue != null ? attrValue : null;
|
|
141
165
|
}
|
|
142
166
|
let property;
|
|
143
167
|
try {
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
catch (_e) {
|
|
168
|
+
property = getProperty(element, propName);
|
|
169
|
+
} catch (_e) {
|
|
147
170
|
}
|
|
148
171
|
if (property == null || isObject(property)) {
|
|
149
|
-
|
|
150
|
-
|
|
172
|
+
const attrValue = element.getAttribute(name);
|
|
173
|
+
return attrValue != null ? attrValue : null;
|
|
151
174
|
}
|
|
152
175
|
return property != null ? String(property) : null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
176
|
+
}
|
|
177
|
+
var get_attribute_default = get;
|
|
178
|
+
return __toCommonJS(get_attribute_exports);
|
|
179
|
+
})();
|
|
180
|
+
return __seleniumAtom.default;
|
|
181
|
+
})()
|