Skip to content

Commit

Permalink
fix: safeguard browser.getTimeouts logging (#483)
Browse files Browse the repository at this point in the history
closes #473
(and merged by the mighty power of grayskull)
  • Loading branch information
vobu committed Jun 14, 2023
1 parent df86e83 commit 7ddd2ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions examples/ui5-ts-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"start:ui5": "ui5 serve --port 8080 --accept-remote-connections",
"//test": "run-s test:*",
"test": "wdio run wdio-ui5.conf.ts",
"test:browserstack:local": "wdio run test/e2e/cloud-services/browserstack.conf.local.ts",
"test:saucelabs:local": "wdio run test/e2e/cloud-services/saucelabs.conf.local.ts",
"test:browserstack": "wdio run test/e2e/cloud-services/browserstack.conf.ts",
"test:authentication": "run-s authentication:*",
"//test-h:authentication": "run-s \"authentication:* -- --headless\"",
"test:authentication:bstack": "BROWSERSTACK=true run-s authentication:*",
Expand Down
4 changes: 3 additions & 1 deletion src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default class Service implements Services.ServiceInstance {
await browser.setTimeout({ script: timeout })

Logger.debug(`browser script timeout set to ${timeout}`)
Logger.debug(`browser timeouts are ${JSON.stringify(await browser.getTimeouts(), null, 2)}`)
if (typeof browser.getTimeouts === "function") {
Logger.debug(`browser timeouts are ${JSON.stringify(await browser.getTimeouts(), null, 2)}`)
}

if (browser instanceof MultiRemoteDriver) {
for (const name of (browser as MultiRemoteDriver).instances) {
Expand Down

0 comments on commit 7ddd2ba

Please sign in to comment.