Teacher instructions for the Selenium course

Preparations

Update the sample project with the versions with modern versions.

Create a new branch from master for the specific course so the code can be shared with the participants.

Clone it somewhere, projects/tsu/selenium-test-automation, and work on it there.

Introduction

Sample page: http://selenium.thinkcode.se/

Example - Selenium IDE

Record a Hello, world!

Record submission of a form

Open Idea with the example project in the right branch

Example - WebDriver

Export the code from Selenium IDE and import it in a test class
src/test/java/se/thinkcode/selenium/ExportedHelloWorldTest.java

Create a new test class
src/test/java/se/thinkcode/selenium/HelloWorldTest.java

Implement HelloWorld without page object

Source code: HelloWorldTest.java

Implement HelloWorld with page object

Source code:
HelloWorldTest.java
HelloWorldPage.java

Back to the presentation

Filling a form

Source code:
RequestNewPasswordTest.java
RequestPasswordPage.java
ConfirmPasswordSentPage.java

Back to the presentation

Check boxes

Source code:
SelectColorTest.java
SelectColorPage.java
SelectedColorPage.java

Back to the presentation

Radio buttons

Source code:
SelectBeverageTest.java
SelectBeveragePage.java

Back to the presentation

Drop down

Source code:
SelectCondimentTest.java
SelectCondimentPage.java

Back to the presentation

Data driven test

Source code:
RequestNewPasswordForLoopTest.java
RequestNewPasswordTest.java

Back to the presentation

Screenshot on failure

Source code:
FailingTest.java
ScreenShotRule.java

Back to the presentation

Slow response

Source code:
ExchangeRateTest.java
RequestExchangeRatePage.java
ExchangeRatePage.java
ResultPageException.java

Back to the presentation

Pop up

Source code:
NewPageTest.java
NewPage.java
AlertTest.java
AlertPage.java

Back to the presentation

Cross browser

Source code:

HelloWorldLocalTest.java
NOT UP TO DATE HelloWorldSaucelabsTest.java
NOT UP TO DATE HelloWorldPage.java

Executable specification

Source code:

ChangePassword.feature
RunCukesTest.java
PasswordSteps.java
PasswordHelper.java
RequestPage.java
ConfirmationPage.java