Comments (5)
I expected to be able to run my tests locally, while being offline due to being on the train or other reasons.
As per our documentation this works if:
If you omit browserVersion, WebdriverIO will first try to locate and use an existing installation with locate-app, otherwise it will download and install the current stable browser release.
So I assume that this application look up has failed which caused WebdriverIO to try to download the binary and driver.
Additionally, why is chrome labs being checked when only using Firefox?
I am not sure why you are experiencing this, I can't reproduce it on my side as I am getting Error: getaddrinfo ENOTFOUND product-details.mozilla.org
Do you have Firefox installed on your OS? If so which path is it on? What OS are you using?
from webdriverio.
Thanks for the quick reply. I copied a more readable error message now, somehow it copied weirdly formatted on my phone.
I definitely did not specify a browser version. (should I paste my wdio.conf.js somewhere?)
This is on macOS, and I use Firefox everyday. Also when I am online, it doesn't seem to always redownload.
I just ran locate-app
manually, and that gave '/Applications/Firefox.app/Contents/MacOS/Firefox'
as a path. This was on node v18 (in my test environment I use both)
Does any of that help?
from webdriverio.
@step21 thanks for further details, it seems that WebdriverIO unnecessarily tries to resolve the Firefox version, even though it has all required information to run the test. This causes an unnecessary network hop. A possible fix would be the following:
diff --git a/packages/wdio-utils/src/node/utils.ts b/packages/wdio-utils/src/node/utils.ts
index 93459fe61..8be7bbd84 100644
--- a/packages/wdio-utils/src/node/utils.ts
+++ b/packages/wdio-utils/src/node/utils.ts
@@ -190,16 +190,16 @@ export async function setupPuppeteerBrowser(cacheDir: string, caps: WebdriverIO.
linuxWhich: 'chromium-browser'
}).catch(() => undefined)
: await locateFirefox().catch(() => undefined)
- const tag = isChromeOrChromium
+ const browserVersion = isChromeOrChromium
? getBuildIdByChromePath(executablePath)
: await getBuildIdByFirefoxPath(executablePath)
/**
* verify that we have a valid Chrome/Firefox browser installed
*/
- if (tag) {
+ if (browserVersion) {
return {
executablePath,
- browserVersion: await resolveBuildId(browserName, platform, tag)
+ browserVersion
}
}
}
Feel free to raise a PR with the change set.
from webdriverio.
Thanks for reporting!
We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!
from webdriverio.
@step21 thanks for further details, it seems that WebdriverIO unnecessarily tries to resolve the Firefox version, even though it has all required information to run the test. This causes an unnecessary network hop. A possible fix would be
...
Feel free to raise a PR with the change set.
Oh wow thanks, that is very helpful, will try to make a PR.
from webdriverio.
Related Issues (20)
- [π‘ Feature]: Timeout for Entirety of WebDriverIO Test Runner Instance HOT 2
- [π Bug]: Cannot command on elements coerced into an array: `Malformed type for "elementId" parameter` HOT 2
- [π Bug]: Is the gitpod environment broken? HOT 2
- [π Bug]: @wdio/junit-reporter - Both Errors and Failures Incremented for Failed Tests HOT 2
- [π Bug]: touchAction exec error ( [email protected] ) HOT 1
- [π Bug]: Chrome temporary profile left on disk HOT 5
- [π Bug]: Mocha Step Definition Timeout HOT 4
- [π Bug]: custom element commands doesn't work with browser runner HOT 7
- [π Bug]: TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function HOT 3
- [π‘ Feature]: Centralized context manager for Iframe lookups HOT 1
- [π‘ Feature]: Support configuring NODE_OPTIONS for ChromeDriver separately from NODE_OPTIONS for WDIO itself HOT 5
- [π Bug]: I should be able to chain element using both xpath and css HOT 1
- [π Bug]: "goog:chromeOptions" args and prefs are being ignored? HOT 3
- [π Bug]: <Tough all the test cases of my spec files are passed it shows 1 spec failure in the console log> HOT 4
- [π‘ Feature]: Allow skipping anywhere in test execution HOT 5
- @wdio/runner: Error: Cannot find module HOT 1
- ERROR @wdio/runner: Error: Cannot find typescript module imported from spec.ts HOT 1
- [π Docs]: v8.36.0 tag and GitHub release points to wrong commit, v8.36.1 release notes are wrong HOT 1
- [π Bug]: isElementDisplayed returns incorrect result for elements with overflow-x/y: hidden and zero width/height HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdriverio.