You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2021. It is now read-only.
@@ -37,15 +37,15 @@ Even though both projects share the same purpose is good to have alternatives. L
37
37
If you don't require a real browser [PhantomJS](https://github.com/ariya/phantomjs) might be enough for you.
38
38
[Electron](https://wallabyjs.com/docs/integration/electron.html) allows to use the latest Chromium/V8 which might be equivalent to running in Chrome however still requires a display so [xvfb][xvfb-electron] is needed. You can also use a paid service like [Sauce Labs][sauce] or [BrowserStack][], note they offer free open source accounts and straightforward [integration with Travis CI](https://docs.travis-ci.com/user/sauce-connect/).
39
39
You can also configure [xvfb](https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI) yourself but it involves some manual steps and doesn't include video recording, nor does PhantomJS nor Electron.
40
-
A [new chromium headless project](https://github.com/electron/electron/issues/228#issuecomment-223797342) looks very promising so might we worth to take a look though as of now leaves video recording out of scope there and Firefox of course.
40
+
A [new chromium headless project](https://github.com/electron/electron/issues/228#issuecomment-223797342) looks very promising so might we worth to take a look though as of now leaves video recording out of scope there and Firefox also out of scope.
# if in Option 2. execute below commands inside docker
418
-
# provider machine `ssh ${REMOTE_DOCKER_SRV}`
419
-
docker stop ${CONTAINER}
420
-
docker rm ${CONTAINER}
421
-
```
422
-
423
334
## Step by step build
424
335
425
-
### 1. Build this image
336
+
### Build this image
337
+
If you git clone this repo locally, i.e. `git clone` it and `cd` into where the Dockerfile is, you can:
426
338
427
-
If you git clone this repo locally, i.e. cd into where the Dockerfile is, you can:
428
-
429
-
docker build -t="elgalu/docker-selenium:local".
430
-
431
-
If you prefer to download the final built image from docker you can pull it, personally I always prefer to build them manually except for the base images like Ubuntu 14.04.2:
432
-
433
-
docker pull elgalu/selenium
339
+
docker build -t selenium .
434
340
435
-
### 2. Use this image
341
+
### Use this image
436
342
437
343
#### e.g. Spawn a container for Chrome testing:
438
344
439
345
CH=$(docker run --rm --name=CH -p=127.0.0.1::24444 -p=127.0.0.1::25900 \
*Note:*`-v /e2e/uploads:/e2e/uploads` is optional in case you are testing browser uploads on your WebApp, you'll probably need to share a directory for this.
443
349
@@ -464,7 +370,7 @@ In case you have RealVNC binary `vnc` in your path, you can always take a look,
464
370
This command line is the same as for Chrome, remember that the selenium running container is able to launch either Chrome or Firefox, the idea around having 2 separate containers, one for each browser is for convenience, plus avoid certain `:focus` issues your WebApp may encounter during e2e automation.
465
371
466
372
FF=$(docker run --rm --name=ff -p=127.0.0.1::24444 -p=127.0.0.1::25900 \
0 commit comments