Page MenuHomePhabricator

Selenium tests fail with `browser.getLogs is not a function`
Open, Needs TriagePublic

Description

Status

On Upgrading WebdriverIO to v6 in portals/deploy, test fails with TypeError: browser.getLogs is not a function .
Problem reference : https://github.com/webdriverio/webdriverio/issues/4032
refer : Patch

115:43:52 Execution of 8 spec files started at 2021-08-09T10:13:52.462Z
215:43:52
315:43:52 Server listening to 8080
415:43:53 [0-0] RUNNING in chrome - /tests/selenium/specs/wikibooks.spec.js
515:44:04 [0-0]
615:44:04 Screenshot location: /log/should-display-correct-title-without-errors.png
715:44:04
815:44:04 [0-0] TypeError in "www.wikibooks.org page should display correct title without errors"
915:44:04 TypeError: browser.getLogs is not a function
1015:44:04 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
1115:44:04 at Context.<anonymous> (/src/tests/selenium/specs/wikibooks.spec.js:9:9)
1215:44:04 [0-0] FAILED in chrome - /tests/selenium/specs/wikibooks.spec.js
1315:44:05 [0-1] RUNNING in chrome - /tests/selenium/specs/wikimedia.spec.js
1415:44:06 [0-1]
1515:44:06 Screenshot location: /log/should-display-correct-title-without-errors.png
1615:44:06
1715:44:06 [0-1] TypeError in "www.wikimedia.org page should display correct title without errors"
1815:44:06 TypeError: browser.getLogs is not a function
1915:44:06 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
2015:44:06 at Context.<anonymous> (/src/tests/selenium/specs/wikimedia.spec.js:9:9)
2115:44:07 [0-1] FAILED in chrome - /tests/selenium/specs/wikimedia.spec.js
2215:44:08 [0-2] RUNNING in chrome - /tests/selenium/specs/wikinews.spec.js
2315:44:09 [0-2]
2415:44:09 Screenshot location: /log/should-display-correct-title-without-errors.png
2515:44:09
2615:44:09 [0-2] TypeError in "www.wikinews.org page should display correct title without errors"
2715:44:09 TypeError: browser.getLogs is not a function
2815:44:09 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
2915:44:09 at Context.<anonymous> (/src/tests/selenium/specs/wikinews.spec.js:9:9)
3015:44:09 [0-2] FAILED in chrome - /tests/selenium/specs/wikinews.spec.js
3115:44:10 [0-3] RUNNING in chrome - /tests/selenium/specs/wikipedia.spec.js
3215:44:11 [0-3]
3315:44:11 Screenshot location: /log/Should-have-the-correct-title%3A-%22Wikipedia%22-.png
3415:44:11
3515:44:12 [0-3]
3615:44:12 Screenshot location: /log/should-focus-on-search-input-when-page-is-loaded.png
3715:44:12
3815:44:12 [0-3]
3915:44:12 Screenshot location: /log/should-expand-language-links.png
4015:44:12
4115:44:12 [0-3]
4215:44:12 Screenshot location: /log/should-collapse-language-links.png
4315:44:12
4415:44:13 [0-3]
4515:44:13 Screenshot location: /log/should-produce-search-suggestions-for-the-query-%22Paris%22.png
4615:44:13
4715:44:13 [0-3]
4815:44:13 Screenshot location: /log/should-produce-no-console-errors.png
4915:44:13
5015:44:13 [0-3] TypeError in "www.wikipedia.org page should produce no console errors"
5115:44:13 TypeError: browser.getLogs is not a function
5215:44:13 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
5315:44:13 at Context.<anonymous> (/src/tests/selenium/specs/wikipedia.spec.js:32:9)
5415:44:24 [0-3]
5515:44:24 Screenshot location: /log/Clicking-on-first-search-result-should-redirect-to%3A-%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FParis%22-.png
5615:44:24
5715:44:24 [0-3] FAILED in chrome - /tests/selenium/specs/wikipedia.spec.js
5815:44:25 [0-4] RUNNING in chrome - /tests/selenium/specs/wikiquote.spec.js
5915:44:26 [0-4]
6015:44:26 Screenshot location: /log/should-display-correct-title-without-errors.png
6115:44:26
6215:44:26 [0-4] TypeError in "www.wikiquote.org page should display correct title without errors"
6315:44:26 TypeError: browser.getLogs is not a function
6415:44:26 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
6515:44:26 at Context.<anonymous> (/src/tests/selenium/specs/wikiquote.spec.js:9:9)
6615:44:26 [0-4] FAILED in chrome - /tests/selenium/specs/wikiquote.spec.js
6715:44:27 [0-5] RUNNING in chrome - /tests/selenium/specs/wikiversity.spec.js
6815:44:29 [0-5]
6915:44:29 Screenshot location: /log/should-display-correct-title-without-errors.png
7015:44:29
7115:44:29 [0-5] TypeError in "www.wikiversity.org page should display correct title without errors"
7215:44:29 TypeError: browser.getLogs is not a function
7315:44:29 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
7415:44:29 at Context.<anonymous> (/src/tests/selenium/specs/wikiversity.spec.js:9:9)
7515:44:29 [0-5] FAILED in chrome - /tests/selenium/specs/wikiversity.spec.js
7615:44:30 [0-6] RUNNING in chrome - /tests/selenium/specs/wikivoyage.spec.js
7715:44:31 [0-6]
7815:44:31 Screenshot location: /log/should-display-correct-title-without-errors.png
7915:44:31
8015:44:31 [0-6] TypeError in "www.wikivoyage.org page should display correct title without errors"
8115:44:31 TypeError: browser.getLogs is not a function
8215:44:31 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
8315:44:31 at Context.<anonymous> (/src/tests/selenium/specs/wikivoyage.spec.js:9:9)
8415:44:31 [0-6] FAILED in chrome - /tests/selenium/specs/wikivoyage.spec.js
8515:44:32 [0-7] RUNNING in chrome - /tests/selenium/specs/wiktionary.spec.js
8615:44:33 [0-7]
8715:44:33 Screenshot location: /log/should-display-correct-title-without-errors.png
8815:44:33
8915:44:33 [0-7] TypeError in "www.wiktionary.org page should display correct title without errors"
9015:44:33 TypeError: browser.getLogs is not a function
9115:44:33 at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
9215:44:33 at Context.<anonymous> (/src/tests/selenium/specs/wiktionary.spec.js:9:9)
9315:44:33 [0-7] FAILED in chrome - /tests/selenium/specs/wiktionary.spec.js
9415:44:33
9515:44:33 "spec" Reporter:
9615:44:33 ------------------------------------------------------------------
9715:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] Spec: /src/tests/selenium/specs/wikibooks.spec.js
9815:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] Running: Chrome Headless (v90.0.4430.212) on linux
9915:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] Session ID: d893999f-6560-4984-a99b-6fc0b318ab1d
10015:44:33 [Chrome Headless 90.0.4430.212 linux #0-0]
10115:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] www.wikibooks.org page
10215:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] ✖ should display correct title without errors
10315:44:33 [Chrome Headless 90.0.4430.212 linux #0-0]
10415:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] 1 failing (1s)
10515:44:33 [Chrome Headless 90.0.4430.212 linux #0-0]
10615:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] 1) www.wikibooks.org page should display correct title without errors
10715:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] browser.getLogs is not a function
10815:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] TypeError: browser.getLogs is not a function
10915:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
11015:44:33 [Chrome Headless 90.0.4430.212 linux #0-0] at Context.<anonymous> (/src/tests/selenium/specs/wikibooks.spec.js:9:9)
11115:44:33 ------------------------------------------------------------------
11215:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] Spec: /src/tests/selenium/specs/wikimedia.spec.js
11315:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] Running: Chrome Headless (v90.0.4430.212) on linux
11415:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] Session ID: 615580e1-fefc-4c02-aaf1-28216a451d7b
11515:44:33 [Chrome Headless 90.0.4430.212 linux #0-1]
11615:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] www.wikimedia.org page
11715:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] ✖ should display correct title without errors
11815:44:33 [Chrome Headless 90.0.4430.212 linux #0-1]
11915:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] 1 failing (473ms)
12015:44:33 [Chrome Headless 90.0.4430.212 linux #0-1]
12115:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] 1) www.wikimedia.org page should display correct title without errors
12215:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] browser.getLogs is not a function
12315:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] TypeError: browser.getLogs is not a function
12415:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
12515:44:33 [Chrome Headless 90.0.4430.212 linux #0-1] at Context.<anonymous> (/src/tests/selenium/specs/wikimedia.spec.js:9:9)
12615:44:33 ------------------------------------------------------------------
12715:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] Spec: /src/tests/selenium/specs/wikinews.spec.js
12815:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] Running: Chrome Headless (v90.0.4430.212) on linux
12915:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] Session ID: 24a6ec7f-31f9-4b5c-8fdd-24c8caff7614
13015:44:33 [Chrome Headless 90.0.4430.212 linux #0-2]
13115:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] www.wikinews.org page
13215:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] ✖ should display correct title without errors
13315:44:33 [Chrome Headless 90.0.4430.212 linux #0-2]
13415:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] 1 failing (558ms)
13515:44:33 [Chrome Headless 90.0.4430.212 linux #0-2]
13615:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] 1) www.wikinews.org page should display correct title without errors
13715:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] browser.getLogs is not a function
13815:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] TypeError: browser.getLogs is not a function
13915:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
14015:44:33 [Chrome Headless 90.0.4430.212 linux #0-2] at Context.<anonymous> (/src/tests/selenium/specs/wikinews.spec.js:9:9)
14115:44:33 ------------------------------------------------------------------
14215:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] Spec: /src/tests/selenium/specs/wikipedia.spec.js
14315:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] Running: Chrome Headless (v90.0.4430.212) on linux
14415:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] Session ID: e6025d3a-1bb3-46b9-93b5-e0e12ad1f878
14515:44:33 [Chrome Headless 90.0.4430.212 linux #0-3]
14615:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] www.wikipedia.org page
14715:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✓ Should have the correct title: "Wikipedia"
14815:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✓ should focus on search input when page is loaded
14915:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✓ should expand language links
15015:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✓ should collapse language links
15115:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✓ should produce search suggestions for the query "Paris"
15215:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✖ should produce no console errors
15315:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] ✓ Clicking on first search result should redirect to: "https://en.wikipedia.org/wiki/Paris"
15415:44:33 [Chrome Headless 90.0.4430.212 linux #0-3]
15515:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] 6 passing (13.6s)
15615:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] 1 failing
15715:44:33 [Chrome Headless 90.0.4430.212 linux #0-3]
15815:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] 1) www.wikipedia.org page should produce no console errors
15915:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] browser.getLogs is not a function
16015:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] TypeError: browser.getLogs is not a function
16115:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
16215:44:33 [Chrome Headless 90.0.4430.212 linux #0-3] at Context.<anonymous> (/src/tests/selenium/specs/wikipedia.spec.js:32:9)
16315:44:33 ------------------------------------------------------------------
16415:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] Spec: /src/tests/selenium/specs/wikiquote.spec.js
16515:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] Running: Chrome Headless (v90.0.4430.212) on linux
16615:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] Session ID: 80d491d0-e42c-4c6d-bb4d-77bf58a3d860
16715:44:33 [Chrome Headless 90.0.4430.212 linux #0-4]
16815:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] www.wikiquote.org page
16915:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] ✖ should display correct title without errors
17015:44:33 [Chrome Headless 90.0.4430.212 linux #0-4]
17115:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] 1 failing (561ms)
17215:44:33 [Chrome Headless 90.0.4430.212 linux #0-4]
17315:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] 1) www.wikiquote.org page should display correct title without errors
17415:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] browser.getLogs is not a function
17515:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] TypeError: browser.getLogs is not a function
17615:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
17715:44:33 [Chrome Headless 90.0.4430.212 linux #0-4] at Context.<anonymous> (/src/tests/selenium/specs/wikiquote.spec.js:9:9)
17815:44:33 ------------------------------------------------------------------
17915:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] Spec: /src/tests/selenium/specs/wikiversity.spec.js
18015:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] Running: Chrome Headless (v90.0.4430.212) on linux
18115:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] Session ID: d30584e5-8a76-4c04-9e1a-a8c30ca75ad9
18215:44:33 [Chrome Headless 90.0.4430.212 linux #0-5]
18315:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] www.wikiversity.org page
18415:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] ✖ should display correct title without errors
18515:44:33 [Chrome Headless 90.0.4430.212 linux #0-5]
18615:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] 1 failing (523ms)
18715:44:33 [Chrome Headless 90.0.4430.212 linux #0-5]
18815:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] 1) www.wikiversity.org page should display correct title without errors
18915:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] browser.getLogs is not a function
19015:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] TypeError: browser.getLogs is not a function
19115:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
19215:44:33 [Chrome Headless 90.0.4430.212 linux #0-5] at Context.<anonymous> (/src/tests/selenium/specs/wikiversity.spec.js:9:9)
19315:44:33 ------------------------------------------------------------------
19415:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] Spec: /src/tests/selenium/specs/wikivoyage.spec.js
19515:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] Running: Chrome Headless (v90.0.4430.212) on linux
19615:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] Session ID: 3e754962-37c1-4502-90ed-44523dfbe428
19715:44:33 [Chrome Headless 90.0.4430.212 linux #0-6]
19815:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] www.wikivoyage.org page
19915:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] ✖ should display correct title without errors
20015:44:33 [Chrome Headless 90.0.4430.212 linux #0-6]
20115:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] 1 failing (664ms)
20215:44:33 [Chrome Headless 90.0.4430.212 linux #0-6]
20315:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] 1) www.wikivoyage.org page should display correct title without errors
20415:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] browser.getLogs is not a function
20515:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] TypeError: browser.getLogs is not a function
20615:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
20715:44:33 [Chrome Headless 90.0.4430.212 linux #0-6] at Context.<anonymous> (/src/tests/selenium/specs/wikivoyage.spec.js:9:9)
20815:44:33 ------------------------------------------------------------------
20915:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] Spec: /src/tests/selenium/specs/wiktionary.spec.js
21015:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] Running: Chrome Headless (v90.0.4430.212) on linux
21115:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] Session ID: ad4519db-32f8-4567-8648-15f7aac91a22
21215:44:33 [Chrome Headless 90.0.4430.212 linux #0-7]
21315:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] www.wiktionary.org page
21415:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] ✖ should display correct title without errors
21515:44:33 [Chrome Headless 90.0.4430.212 linux #0-7]
21615:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] 1 failing (718ms)
21715:44:33 [Chrome Headless 90.0.4430.212 linux #0-7]
21815:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] 1) www.wiktionary.org page should display correct title without errors
21915:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] browser.getLogs is not a function
22015:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] TypeError: browser.getLogs is not a function
22115:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] at Object.noBrowserErrors (/src/tests/selenium/specs/tests.js:40:24)
22215:44:33 [Chrome Headless 90.0.4430.212 linux #0-7] at Context.<anonymous> (/src/tests/selenium/specs/wiktionary.spec.js:9:9)
22315:44:33
22415:44:33
22515:44:33 Spec Files: 0 passed, 8 failed, 8 total (100% completed) in 00:00:41

Event Timeline

zeljkofilipin renamed this task from Selenium tests fails with `browser.getLogs is not a function` to Selenium tests fail with `browser.getLogs is not a function` .Sep 16 2021, 10:22 AM