Skip to content

About:Tests

Alex Muravya edited this page Jul 11, 2017 · 3 revisions

About:Tests

Selenide

Several options here:

Default (aka HtmlUnit)

HtmlUnit is headless browser

Procs:

  • Zero-configuration

  • No external tools needed

Cons:

  • No screenshot

  • External links are not opening correctly

Chrome Run

Runs in normal Chrome browser. Need for ChromeDriver installation and test runner configuration.

Download latest from here

Note for Windows users: There only 32-bit driver available. This works fine with 64-bit Chrome.

Procs:

  • Close to real user experience (what end-user sees)

  • Screenshots available

  • External links are working correctly

Cons:

  • Requires ChromeDriver installation

  • Requires Runner configuration

Chrome Driver

  1. Download zip-archive with driver

  2. Extract it to some location in system (Tip: directory should not contain spaces)

  3. Add 2 java properties to Test Runner:

Browser: -Dselenide.browser=chrome

Path to Chrome driver -Dwebdriver.chrome.driver=C:/opt/chromedriver.exe

yals-chrome-run.PNG

Screenshots

Few moments to mention:

  1. Screenshots are not available, when using headless browser

  2. Screenshots are stored in "target/selenide" directory by default (overrideable by setting "-Dyals.selenide.reportdir")

  3. Recommended to clean target directory each run This clean be done by executing mvn clean each run

yals-test-clean.PNG

Clone this wiki locally