Preparations
- create a Selenium Windows folder on the Desktop
- download https://github.com/SeleniumHQ/selenium/releases/download/selenium-3.141.59/selenium-server-standalone-3.141.59.jar file (Selenium Server) into the above-created folder
- download a geckodriver-vA.B.C-win64.zip file from the release on the https://github.com/mozilla/geckodriver/releases page, that matches your Firefox version (if you're using Firefox 119, then download a file from the 0.33.0 release)
- unpack the above-downloaded file into the above-created folder
- in the same folder create a run.bat file with this content:
java -jar selenium-server-standalone-3.141.59.jar
- double-click on the run.bat file to execute it
- a window with a running Selenium Server (see approximate content below) will open and won't automatically close:
C:\Users\Username\Desktop\Selenium Windows>java -jar selenium-server-standalone-3.14 1.59.jar 11:31:14.190 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, re vision: e82be7d358 11:31:14.377 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standal one Selenium Server on port 4444 2023-11-15 11:31:14.598:INFO::main: Logging initialized @1096ms to org.seleniumh q.jetty9.util.log.StdErrLog 11:31:15.194 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet 11:31:15.449 INFO [SeleniumServer.boot] - Selenium Server is up and running on p ort 4444
- create the /system/mink_config.php file with this content (replace IP_OF_WINDOWS_COMPUTER with the internal IP computer, where Selenium Server was started) :
<?php return array( 'default' => array('alias' => 'ff_local'), 'ff_local' => array( 'browserName' => 'firefox', 'host' => 'IP_OF_WINDOWS_COMPUTER', 'port' => 4444, 'timeout' => 15 ), );
- run the composer install command in the root folder of In-Portal
- in the Admin Console reset unit config cache for new PHP classes to be discovered
Testing
- run the ./vendor/bin/phpunit -c tools/build/inc/phpunit.xml in the root folder of In-Portal installation
- confirm, that:
- during command execution Firefox was started automatically with In-Portal shown in it and some interactions (e.g. buttons clicked) were done in these windows
- PHPUnit tests had no errors (example of successful output below):
... Time: 23.21 seconds, Memory: 10.00MB OK (3 tests, 3 assertions)