O'Reilly logo

Mastering Selenium WebDriver 3.0 by Mark Collin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Switching from TestNG to JUnit

First of all, we need to make some changes to our POM.xml to use JUnit instead of TestNG; we will start with the properties block:

<properties>    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>    <project.reporting.outputEncoding>UTF-     8</project.reporting.outputEncoding>    <java.version>1.8</java.version>    <!-- Dependency versions -->    <selenium.version>3.12.0</selenium.version>    <junit.version>4.12</junit.version>    <assertj-core.version>3.10.0</assertj-core.version>    <query.version>1.2.0</query.version>    <commons-io.version>2.6</commons-io.version>    <httpclient.version>4.5.5</httpclient.version>    <!-- Plugin versions -->    <driver-binary-downloader-maven-plugin.version>1.0.17</driver-   binary-downloader-maven-plugin.version> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required