diff --git a/lib/commands/context.js b/lib/commands/context.js index e3d186ad5..1eec666fc 100644 --- a/lib/commands/context.js +++ b/lib/commands/context.js @@ -35,7 +35,7 @@ const extensions = { */ let ctxs = [{id: NATIVE_WIN, view: {}}]; this.contexts = [NATIVE_WIN]; - for (let view of webviews) { + for (const view of webviews) { ctxs.push({id: `${WEBVIEW_BASE}${view.id}`, view}); this.contexts.push(view.id.toString()); } @@ -158,7 +158,7 @@ const extensions = { this.curWebFrames = []; }); - await this.remote.connect(this.opts.webviewConnectTimeout); + await this.remote.connect(); }, /** diff --git a/lib/commands/web.js b/lib/commands/web.js index a5ccc862a..28b0282ac 100644 --- a/lib/commands/web.js +++ b/lib/commands/web.js @@ -306,7 +306,7 @@ const helpers = { */ async _deleteCookie(cookie) { const url = `http${cookie.secure ? 's' : ''}://${cookie.domain}${cookie.path}`; - return await (/** @type {import('appium-remote-debugger').RemoteDebugger} */ (this.remote)).deleteCookie(cookie.name, url); + return await (/** @type {RemoteDebugger} */ (this.remote)).deleteCookie(cookie.name, url); }, /** * @this {XCUITestDriver} @@ -351,18 +351,20 @@ const helpers = { */ async executeAtom(atom, args, alwaysDefaultFrame = false) { let frames = alwaysDefaultFrame === true ? [] : this.curWebFrames; - let promise = (/** @type {import('appium-remote-debugger').RemoteDebugger} */ (this.remote)).executeAtom(atom, args, frames); + let promise = (/** @type {RemoteDebugger} */ (this.remote)).executeAtom(atom, args, frames); return await this.waitForAtom(promise); }, /** * @this {XCUITestDriver} + * @param {string} atom + * @param {any[]} args */ - async executeAtomAsync(atom, args, responseUrl) { + async executeAtomAsync(atom, args) { // save the resolve and reject methods of the promise to be waited for let promise = new B((resolve, reject) => { this.asyncPromise = {resolve, reject}; }); - await (/** @type {RemoteDebugger} */ (this.remote)).executeAtomAsync(atom, args, this.curWebFrames, responseUrl); + await (/** @type {RemoteDebugger} */ (this.remote)).executeAtomAsync(atom, args, this.curWebFrames); return await this.waitForAtom(promise); }, /** diff --git a/package.json b/package.json index 9f6874446..1c70ecd99 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "appium-idb": "^1.6.13", "appium-ios-device": "^2.5.4", "appium-ios-simulator": "^6.1.7", - "appium-remote-debugger": "^11.4.0", + "appium-remote-debugger": "^11.4.2", "appium-webdriveragent": "^8.7.8", "appium-xcode": "^5.1.4", "async-lock": "^1.4.0",