Skip to content

Commit

Permalink
[js] Fix flaky CDP dom mutation (#10029)
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani authored Nov 15, 2021
1 parent d6acda7 commit c129dc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions javascript/node/selenium-webdriver/lib/by.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,5 @@ module.exports = {
withTagName: withTagName,
locateWith: locateWith,
checkedLocator: check,
escapeCss: escapeCss
}
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/lib/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ class WebDriver {
if (params.method === 'Runtime.bindingCalled') {
let payload = JSON.parse(params['params']['payload'])
let elements = await this.findElements({
css: '*[data-__webdriver_id=' + payload['target'],
css: '*[data-__webdriver_id=' + by.escapeCss(payload['target']) + ']',
})

if (elements.length === 0) {
Expand Down

0 comments on commit c129dc9

Please sign in to comment.