Skip to content

Commit 5fb2243

Browse files
committed
[rb] update generated files
1 parent 9d2fc1d commit 5fb2243

16 files changed

+310
-176
lines changed

rb/lib/selenium/webdriver/atoms/findElements.js

Lines changed: 92 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rb/lib/selenium/webdriver/atoms/getAttribute.js

100644100755
Lines changed: 104 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rb/lib/selenium/webdriver/atoms/isDisplayed.js

100644100755
Lines changed: 76 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
(function () {
2+
const observer = new MutationObserver((mutations) => {
3+
for (const mutation of mutations) {
4+
switch (mutation.type) {
5+
case 'attributes':
6+
// Don't report our own attribute has changed.
7+
if (mutation.attributeName === "data-__webdriver_id") {
8+
break;
9+
}
10+
const curr = mutation.target.getAttribute(mutation.attributeName);
11+
var id = mutation.target.dataset.__webdriver_id
12+
if (!id) {
13+
id = Math.random().toString(36).substring(2) + Date.now().toString(36);
14+
mutation.target.dataset.__webdriver_id = id;
15+
}
16+
const json = JSON.stringify({
17+
'target': id,
18+
'name': mutation.attributeName,
19+
'value': curr,
20+
'oldValue': mutation.oldValue
21+
});
22+
__webdriver_attribute(json);
23+
break;
24+
default:
25+
break;
26+
}
27+
}
28+
});
29+
30+
observer.observe(document, {
31+
'attributes': true,
32+
'attributeOldValue': true,
33+
'characterData': true,
34+
'characterDataOldValue': true,
35+
'childList': true,
36+
'subtree': true
37+
});
38+
})();
-11.5 KB
Binary file not shown.
11.5 KB
Binary file not shown.
-77 KB
Binary file not shown.
77.5 KB
Binary file not shown.
-38 KB
Binary file not shown.
38 KB
Binary file not shown.

0 commit comments

Comments
 (0)