Page MenuHomePhabricator

Upgrade extensions/Popups to webdriver.io 9
Closed, ResolvedPublic5 Estimated Story Points

Details

Event Timeline

Change #1156609 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/extensions/Popups@master] selenium: Upgrade to webdriver.io 9

https://gerrit.wikimedia.org/r/1156609

zeljkofilipin set the point value for this task to 5.
zeljkofilipin subscribed.
pwangai subscribed.

@Peter is this something you need help with or can this task be considered abandoned? I don't know much about Selenium these days but I can help with any npm upgrades if you need them (i've unblocked the typescript issues).

The issue here seems to be same as RelatedArticles now?
Error: Unable to load spec files quite likely because they rely on browser` object that is not fully initialized.
12:07:28 [0-0] browser object has only capabilities and some flags like isMobile`

Let us take this up again, this seems to be a generic problem with the 9 upgrade with the upgrade to ESM inside of wdio. Let's make sure we take this the next sprint.

I looked into the RelatedArticles and that seems to be something else. This problems looks like it was introduced in wdio9 when they moved to ES6 module system. I cannot reproduce this when I run this locally with Quickstart. Let me start again tomorrow ad have a look and see how we can get something useful out of the log to understand what's wrong,

I could see now when working in other stuff, it seems like:

[0-5] RUNNING in chrome - file:///tests/selenium/docs/Use_MediaWiki_API/specs/api.js
[0-5] 2025-09-11T09:46:46.501Z ERROR @wdio/runner: Error: Unable to load spec files quite likely because they rely on `browser` object that is not fully initialized.
[0-5] `browser` object has only `capabilities` and some flags like `isMobile`.
[0-5] Helper files that use other `browser` commands have to be moved to `before` hook.

Happens if there's an error in one of the files. I had missed to change an import that pointed to a file that do not exist. I wonder if there could be something that do not compile here, let me check that.

The problem here was some miss-sync in package-lock. I got the one from master, installed again in fresh and then it worked.

Change #1156609 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] selenium: Upgrade to webdriver.io 9

https://gerrit.wikimedia.org/r/1156609