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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +22 -0
  3. data/Gemfile +14 -0
  4. data/README.md +20 -0
  5. data/bin/linux-arm64/selenium-manager +0 -0
  6. data/bin/linux-x86_64/selenium-manager +0 -0
  7. data/bin/macos/selenium-manager +0 -0
  8. data/bin/selenium-manager-THIRD-PARTY-NOTICES.txt +544 -227
  9. data/bin/selenium-manager.cdx.json +810 -728
  10. data/bin/windows/selenium-manager.exe +0 -0
  11. data/lib/selenium/webdriver/atoms/findElements.js +961 -248
  12. data/lib/selenium/webdriver/atoms/getAttribute.js +154 -125
  13. data/lib/selenium/webdriver/atoms/isDisplayed.js +434 -362
  14. data/lib/selenium/webdriver/atoms.rb +4 -1
  15. data/lib/selenium/webdriver/bidi/protocol/bluetooth.rb +6 -6
  16. data/lib/selenium/webdriver/bidi/protocol/browser.rb +21 -9
  17. data/lib/selenium/webdriver/bidi/protocol/browsing_context.rb +109 -39
  18. data/lib/selenium/webdriver/bidi/protocol/emulation.rb +89 -44
  19. data/lib/selenium/webdriver/bidi/protocol/input.rb +95 -31
  20. data/lib/selenium/webdriver/bidi/protocol/log.rb +4 -4
  21. data/lib/selenium/webdriver/bidi/protocol/moz_debugging.rb +12 -10
  22. data/lib/selenium/webdriver/bidi/protocol/moz_profiler.rb +4 -4
  23. data/lib/selenium/webdriver/bidi/protocol/network.rb +82 -39
  24. data/lib/selenium/webdriver/bidi/protocol/script.rb +39 -25
  25. data/lib/selenium/webdriver/bidi/protocol/session.rb +82 -28
  26. data/lib/selenium/webdriver/bidi/protocol/storage.rb +3 -3
  27. data/lib/selenium/webdriver/bidi/protocol/user_agent_client_hints.rb +3 -3
  28. data/lib/selenium/webdriver/bidi/protocol/web_extension.rb +17 -9
  29. data/lib/selenium/webdriver/bidi/serialization/record.rb +92 -17
  30. data/lib/selenium/webdriver/bidi/serialization.rb +2 -2
  31. data/lib/selenium/webdriver/bidi/support/bidi_generate.rb +241 -143
  32. data/lib/selenium/webdriver/common/client_config.rb +4 -1
  33. data/lib/selenium/webdriver/common/driver_finder.rb +5 -2
  34. data/lib/selenium/webdriver/common/websocket_connection.rb +51 -13
  35. data/lib/selenium/webdriver/remote/http/default.rb +17 -1
  36. data/lib/selenium/webdriver/version.rb +1 -1
  37. data/selenium-webdriver.gemspec +0 -12
  38. metadata +6 -163
@@ -1,152 +1,181 @@
1
- (function (element, attribute) {
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
- 'class': 'className',
4
- 'readonly': 'readOnly',
28
+ "class": "className",
29
+ "readonly": "readOnly"
5
30
  };
6
- const BOOLEAN_PROPERTIES = new Set([
7
- 'allowfullscreen',
8
- 'allowpaymentrequest',
9
- 'allowusermedia',
10
- 'async',
11
- 'autofocus',
12
- 'autoplay',
13
- 'checked',
14
- 'compact',
15
- 'complete',
16
- 'controls',
17
- 'declare',
18
- 'default',
19
- 'defaultchecked',
20
- 'defaultselected',
21
- 'defer',
22
- 'disabled',
23
- 'ended',
24
- 'formnovalidate',
25
- 'hidden',
26
- 'indeterminate',
27
- 'iscontenteditable',
28
- 'ismap',
29
- 'itemscope',
30
- 'loop',
31
- 'multiple',
32
- 'muted',
33
- 'nohref',
34
- 'nomodule',
35
- 'noresize',
36
- 'noshade',
37
- 'novalidate',
38
- 'nowrap',
39
- 'open',
40
- 'paused',
41
- 'playsinline',
42
- 'pubdate',
43
- 'readonly',
44
- 'required',
45
- 'reversed',
46
- 'scoped',
47
- 'seamless',
48
- 'seeking',
49
- 'selected',
50
- 'truespeed',
51
- 'typemustmatch',
52
- 'willvalidate',
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(element, attributeName) {
55
- return element.getAttribute(attributeName.toLowerCase());
79
+ function getAttribute(element2, attributeName) {
80
+ return element2.getAttribute(attributeName.toLowerCase());
56
81
  }
57
- function getProperty(element, propertyName) {
58
- return element[propertyName];
82
+ function getProperty(element2, propertyName) {
83
+ return element2[propertyName];
59
84
  }
60
85
  function isElement(node, tagName) {
61
- const elem = node;
62
- if (!elem || elem.nodeType !== 1) {
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 isSelected(element) {
85
- var _a;
86
- if (isElement(element, 'OPTION')) {
87
- return element.selected;
88
- }
89
- const type = (_a = element.type) === null || _a === void 0 ? void 0 : _a.toLowerCase();
90
- if (type === 'checkbox' || type === 'radio') {
91
- return element.checked;
92
- }
93
- return false;
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
- return value !== null && (typeof value === 'object' || typeof value === 'function');
121
+ return value !== null && (typeof value === "object" || typeof value === "function");
97
122
  }
98
123
  const name = attribute.toLowerCase();
99
- if (name === 'style') {
100
- const style = element.style;
101
- if (!style) {
102
- return null;
103
- }
104
- return typeof style === 'string' ? style : style.cssText;
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 === 'selected' || name === 'checked') && isSelectable(element)) {
107
- return isSelected(element) ? 'true' : null;
131
+ if ((name === "selected" || name === "checked") && isSelectable(element)) {
132
+ return isSelected(element) ? "true" : null;
108
133
  }
109
- const isLink = isElement(element, 'A');
110
- const isImg = isElement(element, 'IMG');
111
- if ((isImg && name === 'src') || (isLink && name === 'href')) {
112
- const attrValue = getAttribute(element, name);
113
- if (attrValue) {
114
- return String(getProperty(element, name));
115
- }
116
- return attrValue;
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 === 'spellcheck') {
119
- const attrValue = getAttribute(element, name);
120
- if (attrValue !== null) {
121
- const lower = attrValue.toLowerCase();
122
- if (lower === 'false') {
123
- return 'false';
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
- return String(getProperty(element, name));
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
- const hasAttr = element.getAttribute(name) !== null;
134
- const propValue = getProperty(element, propName);
135
- return hasAttr || !!propValue ? 'true' : null;
158
+ const hasAttr = element.getAttribute(name) !== null;
159
+ const propValue = getProperty(element, propName);
160
+ return hasAttr || !!propValue ? "true" : null;
136
161
  }
137
- if (name === 'value' && isElement(element, 'LI')) {
138
- const attrValue = element.getAttribute(name);
139
- return attrValue != null ? attrValue : null;
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
- property = getProperty(element, propName);
144
- }
145
- catch (_e) {
168
+ property = getProperty(element, propName);
169
+ } catch (_e) {
146
170
  }
147
171
  if (property == null || isObject(property)) {
148
- const attrValue = element.getAttribute(name);
149
- return attrValue != null ? attrValue : null;
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
+ })()