TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Wdio – Docker setup for WebdriverIO

49 点作者 blueimp大约 6 年前
Hi HN,<p>recently there have been a lot of discussions about Chrome&#x27;s dominance on the Web leading to many websites being broken for alternative browsers.<p>I think one of the reasons for this is that browser automation is hard and manual testing is often limited to the browser developers themselves use.<p>I&#x27;ve distilled my best practices for browser test automation into the following project and hope it helps other developers to test their projects with more browsers:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;blueimp&#x2F;wdio" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;blueimp&#x2F;wdio</a><p>It&#x27;s a Docker setup for WebdriverIO with automatic screenshots, image diffing and screen recording support for containerized versions of Chrome and Firefox.<p>It also includes Webdriver configurations to test an app running in Docker with Safari Desktop, Safari Mobile and Chrome Mobile via Appium and Internet Explorer and Microsoft Edge in a Windows 10 virtual machine.

6 条评论

janpot大约 6 年前
wrt &quot;Chrome&#x27;s dominance in test automation&quot;, I&#x27;d like to point out that the puppeteer team is working on Firefox support.<p><a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;puppeteer-firefox" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;puppeteer-firefox</a> <a href="https:&#x2F;&#x2F;aslushnikov.github.io&#x2F;ispuppeteerfirefoxready&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aslushnikov.github.io&#x2F;ispuppeteerfirefoxready&#x2F;</a>
评论 #19299966 未加载
Vinnl大约 6 年前
I&#x27;ve been running WebdriverIO in Docker for a while now, as follows:<p>On my CI server (using GitLab CI), I run a Node Docker image, and connect the Selenium Firefox [1] or Selenium Chrome [2] Docker image to it. I then install WebdriverIO, and tell it to find Selenium on that container&#x27;s hostname.<p>This works, but is a little bit brittle, and I&#x27;ve had to pin the Selenium image versions because something broke at a certain point and it didn&#x27;t seem worth it to fix it yet.<p>Which is to say: I&#x27;d very much be in the market for using the containerised versions of Chrome and Firefox, if there were instructions for doing so in CI - the primary use case for browser automation, in my opinion.<p>I realise that this might not be your intended usage, but figured I&#x27;d provide this feedback just in case it is.<p>[1] <a href="https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;selenium&#x2F;standalone-firefox&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;selenium&#x2F;standalone-firefox&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;selenium&#x2F;standalone-chrome&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;selenium&#x2F;standalone-chrome&#x2F;</a>
评论 #19299908 未加载
dplgk大约 6 年前
I&#x27;ve tried various automated browser tools and they all were flakey. (e.g. Randomly hangs while waiting for an element to appear when the element is already there.). Is this is a bug in my testing code or are all these types of tools actually that unreliable?
评论 #19300024 未加载
ioseph大约 6 年前
I may be out of the loop but one of the reasons I went with a different library to WDIO was the ability to remotely test any browser without having drivers installed on the device. Has this changed with Selenium?
评论 #19300083 未加载
aboutruby大约 6 年前
I&#x27;m mostly used to Capybara &#x2F; Selenium (mostly chromedriver) and have a reasonable level of Javascript&#x2F;Node but I&#x27;m really not sure how I would use this project beyond the setup of having the different browsers running, am I supposed to load those config with WebdriverIO using `remote`?
评论 #19300246 未加载
fulafel大约 6 年前
The docker-comjpose file raises the question is there some handy way for versioning the used docker images in the docker-compose.yml, like pip &#x2F; npm have? You would usually want to control for browser versions in this kind of testing, no?
评论 #19300044 未加载