Code Monkey home page Code Monkey logo

orwanec / wdio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blueimp/wdio

0.0 1.0 0.0 8 KB

Docker setup for WebdriverIO with automatic screenshots, image diffing and screen recording support for containerized versions of Chrome and Firefox. Also includes MacOS host configs to test an app running in Docker with Safari Desktop as well as Safari Mobile and Chrome Mobile via Appium.

Dockerfile 7.90% JavaScript 37.42% HTML 14.58% Python 18.86% Shell 21.24%

wdio's Introduction

WDIO

Docker setup for WebdriverIO with automatic screenshots, image diffing and screen recording support for containerized versions of Chrome and Firefox.

Also includes MacOS host configs to test an app running in Docker with Safari Desktop as well as Safari Mobile and Chrome Mobile via Appium.

Usage

Chrome

Run the tests with Chrome:

docker-compose run --rm wdio [chrome]

Connect to Chrome via VNC:

open vnc://user:secret@localhost:5900

Please Note:
To be able to see Chrome running via VNC or screen recordings, disable headless mode in chrome.js.

Firefox

Run the tests with Firefox:

docker-compose run --rm wdio firefox

Connect to Firefox via VNC:

open vnc://user:secret@localhost:5901

Safari

To run the tests with Safari on MacOS, follow these steps:

  1. Configure Safari to Enable WebDriver Support.

  2. Run safaridriver on port 4444:

    safaridriver -p 4444
  3. Run the tests with Safari:

    docker-compose run --rm wdio safari

Mobile Safari

To run the tests with Mobile Safari on iOS Simulator, follow these steps:

  1. Install Xcode from the Mac App Store.

  2. Install the Xcode Command Line Tools:

    xcode-select --install
  3. Install Node.JS and Carthage via Homebrew:

    brew install node carthage
  4. Make sure the necessary Appium dependencies for iOS testing are installed:

    npx appium-doctor --ios
  5. Install Appium Desktop.

  6. Open Appium Desktop and click on "Start Server":

    open -a appium
  7. Run the tests with Mobile Safari:

    docker-compose run --rm wdio mobile-safari

Mobile Chrome

To run the tests with Mobile Chrome on Android Simulator, follow these steps:

  1. Download Android Studio and on first start, follow the instructions to install the Android SDK and Emulator.

  2. Add the following lines to your ~/.profile to make the JDK included in Android Studio and the installed Android SDK available to Appium:

    export JAVA_HOME='/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home'
    export PATH="$JAVA_HOME/bin:$PATH"
    export ANDROID_HOME=~/Library/Android/sdk
  3. Install Node.JS via Homebrew:

    brew install node
  4. Make sure the necessary Appium dependencies for Android testing are installed:

    npx appium-doctor --android
  5. Install Appium Desktop.

  6. Make sure to configure Appium with a Chromedriver version compatible with the version of Chrome running in your Android device.

  7. Open Appium Desktop and click on "Start Server":

    open -a appium
  8. Start an Android Virtual Device via

    Android Studio โ†’ Configure โ†’ AVD Manager

  9. Run the tests with Mobile Chrome:

    docker-compose run --rm wdio mobile-chrome

Cleanup

Stop and remove the docker-compose container set:

docker-compose down

License

Released under the MIT license.

Author

Sebastian Tschan

wdio's People

Contributors

blueimp avatar

Watchers

Denys Pavlenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.