diff --git a/lib/application.js b/lib/application.js index 912267100..95a18bf62 100644 --- a/lib/application.js +++ b/lib/application.js @@ -31,6 +31,7 @@ function Application(options) { this.webdriverLogPath = options.webdriverLogPath; this.webdriverOptions = options.webdriverOptions || {}; this.requireName = options.requireName || 'require'; + this.w3c = options.w3c; this.api = new Api(this, this.requireName); this.setupPromiseness(); @@ -57,11 +58,11 @@ Application.prototype.start = function () { return self.api.initialize(); }) .then(function () { - return self.client.setTimeouts( - self.waitTimeout, - self.waitTimeout, - self.waitTimeout - ); + return self.client.setTimeout({ + "implicit": self.waitTimeout, + "page load": self.waitTimeout, + "script": self.waitTimeout + }); }) .then(function () { self.running = true; @@ -130,7 +131,8 @@ Application.prototype.getSettings = function () { chromeDriverLogPath: this.chromeDriverLogPath, webdriverLogPath: this.webdriverLogPath, webdriverOptions: this.webdriverOptions, - requireName: this.requireName + requireName: this.requireName, + w3c: this.w3c }; }; @@ -205,7 +207,8 @@ Application.prototype.createClient = function () { binary: launcherPath, args: args, debuggerAddress: self.debuggerAddress, - windowTypes: ['app', 'webview'] + windowTypes: ['app', 'webview'], + w3c: self.w3c } }, logOutput: DevNull() diff --git a/lib/spectron.d.ts b/lib/spectron.d.ts index 2fbeed8a2..a97c63585 100644 --- a/lib/spectron.d.ts +++ b/lib/spectron.d.ts @@ -224,6 +224,10 @@ declare module 'spectron' { * and assigns it to another property name on window. */ requireName?: string; + /** + * W3C Compliance - Chrome Options + */ + w3c?: boolean; }; type AppConstructorOptions = BasicAppSettings & { /**