edge.md
October 10, 2021 · View on GitHub
Edge
Please Note:
This guide assumes that a system with Windows 10 or later has been set up and
the Microsoft Edge browser has been
installed.
To run the tests with Edge, follow these steps:
-
Create a
.envfile in the same directory as ../docker-compose.yml and add the following environment variables:SERVER_HOST=<DOCKER_HOST_IP> SERVER_PORT=8080 WINDOWS_HOST=<WINDOWS_HOST_IP> WINDOWS_ASSETS_DIR=C:\Users\<USERNAME>\Desktop\assets\Make sure that the
DOCKER_HOST_IPis accessible from the Windows machine and theWINDOWS_HOST_IPis accessible from a Docker container.
Also make sure thatWINDOWS_ASSETS_DIRpoints to a valid folder path and ends with a backslash. -
Edit the
examplehost entry in ../etc/windows.hosts and set its IP address to theSERVER_HOSTIP defined in the.envfile. -
Copy ../bin/webdriver.ps1, ../etc/windows.hosts and ../etc/nginx.conf to the same folder in the Windows machine (e.g. the Desktop).
Also copy the files in the ../assets directory to the folder defined asWINDOWS_ASSETS_DIR. -
Create a shortcut to
webdriver.ps1(via "Right-Click" → "Create shortcut" on Windows 10 and "Right-Click" → "Show more options" → "Create shortcut" on Windows 11), then open the properties dialog for the shortcut (via "Right-Click" → "Properties") and set theTargetproperty to the following value:powershell -ExecutionPolicy ByPass -File webdriver.ps1Click "OK" to save the changes to the shortcut.
-
Double-Click on the webdriver shortcut to setup and start the servers.
Confirm the dialog to "allow this app to make changes to your device", so it can edit the Windows hosts file (this dialog only appears if a
windows.hostsfile is present in the same directory).Allow
nginxandMJPEGServerto communicate on all networks in the Windows Defender Firewall dialog.Please Note:
If the program window closes before starting the servers, execute the PowerShell command from the previous step in a console window to be able to read error messages. -
brew install nginx -
Start
nginxas reverse proxy for the application server and allownginxto accept incoming network connections in the macOS Firewall dialog:bin/reverse-proxy.shPlease Note:
This is a workaround to access the application container on the Docker host from the Windows machine without having to disable the macOS firewall. -
Run the tests with Edge:
docker-compose run --rm wdio conf/edge.js