Selenium introduction &
environment configuration
Test automation basics with Selenium & Java
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Plan
1. Defining goals
2. Configuring environment
3. Selenium and test framework definition
4. Creating the project
5. Writing simple test script
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Knowledge on start
Good to have:
1. Have Java basics
2. Any programming background on C-like languages
3. Basic knowledge about software testing
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Goals of the training
1. Learn how to create own test framework
2. Get practical skill in test automation
3. Learn how to use Selenium
By:
Evgeny Novikov
Email:
xevgnov@[Link]
How to learn more effectively?
1. Repeating demo actions
2. Executing exercises
3. Experimenting
The source code for complete project is available here:
[Link]
By:
Evgeny Novikov
Email:
xevgnov@[Link]
What is
Selenium?
Place of WebDriver
System
Test Driver
Driver
Browser
server under the
Framework
test
By:
Evgeny Novikov
Email:
xevgnov@[Link]
What Selenium product we will use?
Selenium ‘brand’ includes:
● WebDriver
● Selenium Standalone Server
● Selenium IDE
● Selenium RC (obsolete)
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Prepare your local
environment
Should be installed:
1. Intellij Idea
download free „Community” version:
[Link]
2. Instal Java: JRE and JDK
[Link]
3. Install Maven
[Link]
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Setup environment variables:
1) JAVA_HOME = C:\Program Files\Java\jdk1.8.0_45
2) MAVEN_HOME = C:\Program Files (x86)\apache-maven-3.3.9
3) M2_HOME = C:\Program Files (x86)\apache-maven-3.3.9\bin
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Create project and configure Intellij Idea
Let’s create a project When project is created, let’s setup
Maven
1) open Intellij Idea
2) create new Maven project - Go to File -> Settings, search
3) choose SDK (installed earlier) Maven
4) Use reverse DNS convention in - Choose Maven home directory -
your groupId AND artifactId select your local Maven
(good practice) (C:/Program Files
5) Set a project name and location (x86)/apache-maven-3.3.9)
- choose option “Import Maven
By:
projects automatically” Evgeny Novikov
Email:
xevgnov@[Link]
Project structure
1) Download WebDriver exe file src
-main
([Link]
--java
download/) --resources
2) Put it to /test/resources folder -test
3) Add new java class SearchTest --java
to /test/java folder --resources
[Link]
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Connecting external libraries
1) Selenium Java
[Link]
Also useful information on the page:
[Link]
2) TestNG
[Link]
By:
Evgeny Novikov
Email:
xevgnov@[Link]
Maven dependencies: configuring [Link]
<dependencies>
<dependency>
<groupId>[Link]</groupId>
<artifactId>selenium-java</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>[Link]</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
By:
</dependencies> Evgeny Novikov
Email:
xevgnov@[Link]
Ready to start?