Skip to content

Commit

Permalink
fix scenarios in proxyless mode if user code rewrites the bind meth…
Browse files Browse the repository at this point in the history
…od (#7480)
  • Loading branch information
AlexKamaev authored Feb 1, 2023
1 parent 412a9a2 commit bdc0a14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"source-map-support": "^0.5.16",
"strip-bom": "^2.0.0",
"testcafe-browser-tools": "2.0.23",
"testcafe-hammerhead": "28.3.0",
"testcafe-hammerhead": "28.3.1",
"testcafe-legacy-api": "5.1.6",
"testcafe-reporter-dashboard": "^0.2.10",
"testcafe-reporter-json": "^2.1.0",
Expand Down
8 changes: 5 additions & 3 deletions src/client/driver/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,11 @@ export default class Driver extends serviceUtils.EventEmitter {
return selectorExecutor.getResult();
};

const dispatchProxylessEventFn = this.options.proxyless
? browser.dispatchProxylessEvent.bind(browser.dispatchProxylessEvent, this.communicationUrls.dispatchProxylessEvent, hammerhead.createNativeXHR)
: null;
const dispatchProxylessEventFn = this.options.proxyless ? nativeMethods.functionBind.call(
browser.dispatchProxylessEvent,
browser.dispatchProxylessEvent,
this.communicationUrls.dispatchProxylessEvent,
hammerhead.createNativeXHR) : null;

const executor = new ActionExecutor(command, {
globalSelectorTimeout: this.options.selectorTimeout,
Expand Down

0 comments on commit bdc0a14

Please sign in to comment.