Skip to content

titusfortner/framework_workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Address Book Tests in JUnit

This open source code is for use in introductory Selenium workshops.

See LICENSE file for details.


Description

Different workshops and lessons will be managed by different branches. To ensure you are getting the correct code for your workshop, go to the Releases Page and download the tutorial zip file that corresponds with your workshop.


Workshop Prerequisites

  1. Install Git
  2. Install IntelliJ
  3. Install JDK
  4. Set up Project
  5. Chrome v86

Install Git

Git is a version control system that lets you check out code from a repository, work with that code on your own branch, and then merge that code with any changes that have been made by other developers. Git is an essential tool for distributed development teams, and is a critical component of the continuous integration/continuous development toolchain.

MacOSX (screen cast):

  1. Go to https://git-scm.com/downloads.
  2. Under Downloads, click Mac OS X.
  3. When the download completes, double-click the .dmg file open the installer package.
  4. Double-click the installer package to begin the installation.

    Security Warning

    You may see a warning message that the package can't be opened because it's not from a recognized developer. If this happens, go to System Preferences > Security and Privacy Settings, and click Open Anyway.

  5. Click Continue for the installation, and enter your local password to authorize the installation.

Windows (screen cast):

  1. Go to https://git-scm.com/downloads
  2. Under Downloads, click on Windows.
  3. When the dialog opens asking if you want to allow the app to make changes to your device, click Yes.
  4. Follow the steps in the setup wizard to complete the installation. You should accept all the default settings.

Install IntelliJ

IntelliJ is an integrated development environment that incorporates several tools for developing and running Java code. You will be using IntelliJ to write and edit the sample Selenium scripts used in the exercises. For these exercises you only need to download the free Community edition.

MacOSX (screen cast):

  1. Go to https://www.jetbrains.com/idea/
  2. Click Download.
  3. On the Downloads page, select macOS.
  4. Under Community, click Download.
  5. When the download completes, double-click the .dmg file open the installer package.
  6. Double-click the installer package to begin the installation.
  7. Drag and drop the IntelliJ icon into the Applications folder.

Windows (screen cast):

  1. Go to https://www.jetbrains.com/idea/
  2. Click Download.
  3. On the Downloads page, select Windows.
  4. Under Community, click Download.
  5. When the download completes, double-click the .exe file to launch the installation wizard. You should accept all the default settings.

Install the Java Developer's Kit

The Java SE Developer Kit lets you develop and deploy Java applications on desktops and servers. It is needed to compile our test code.

MacOSX (screen cast):

  1. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Under Java SE Development Kit 8u161, select Accept License Agreement.
  3. Click the download link for Mac OS.
  4. When the download completes, double-click the .dmg file open the installer package. Double-click the installer package to begin the installation.

Windows (screen cast):

  1. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Under Java SE Development Kit 8u161, select Accept License Agreement.
  3. Click the download link for Windows x64.
  4. When the download completes, double-click the .exe file open the installer package.
  5. Double-click the installer package to begin the installation. You should accept all the default settings.

Set Up This Project in IntelliJ

MacOSX:

  1. Downloading the Project Files

  2. Opening the Project in IntelliJ

    • Launch IntelliJ.
    • Click Open.
    • Browse to the junit_tests directory, and click Open.
    • Click the Sidebars icon in the lower left corner of IntelliJ to open the sidebars.
    • Open the Project sidebar and expand the directories lib > src > test.
    • In the test/examples directory, double click SeleniumScript, and a sample file will load into the editor window.
  3. Configure the Project SDK

    When the file loads, you'll see a notification at the top of the file that the SDK for the project is not defined.

    • Click Setup SDK, and then Configure.
    • Click + in the Configure SDK dialog.
    • Select Java SDK.
    • Browse to the directory where you installed the Java SDK and click OK. IntelliJ will load all the .jar files for the SDK.
    • Click OK when the installation completes.
  4. Confirm that Selenium is Running

    • In the file list on the left, right-click on the SeleniumScript file.
    • Select Run 'SeleniumScript'.

      You should see the code begin to build, and then a console window will open. You should see that the driver opens and closes a browser, confirming that the Selenium environment is running on your local machine.

  5. Ensure Git is properly configured

    • Click the terminal tab on the bottom left of IntelliJ
    • Type the following commands into the terminal, replacing the example information with your own
      $ git config --global user.name "John Doe"
      $ git config --global user.email johndoe@example.com
      

Windows:

  1. Downloading the Project Files

  2. Opening the Project in IntelliJ

    • Launch IntelliJ.
    • Click Open.
    • Browse to the projects > junit_tests directory you created, and click OK.
    • Click the Sidebars icon in the lower left corner of IntelliJ to open the sidebars.
    • Open the Project sidebar.
    • In the Project sidebar, expand the directories junit_tests > lib > src > test > examples.
    • Select SeleniumScript, and a sample file will load into the editor window.
  3. Configure the Project SDK

    When the file loads, you'll see a notification that the SDK for the project is not defined.

    • Click Setup SDK, and then Configure.
    • Click + in the Configure SDK dialog.
    • Select Java SDK.
    • Browse to the directory where you installed the Java SDK and click OK. IntelliJ will load all the .jar files for the SDK.
    • Click OK when the installation completes.
  4. Confirm that Selenium is Running

    • In the file list on the left, right-click on the SeleniumScript file.
    • Select Run 'SeleniumScript'.

      You should see the code begin to build, and then a console window will open. You should see that the driver opens and closes a browser, confirming that the Selenium environment is running on your local machine.

  5. Ensure Git is properly configured

    • Click the terminal tab on the bottom left of IntelliJ
    • Type the following commands into the terminal, replacing the example information with your own
      $ git config --global user.name "John Doe"
      $ git config --global user.email johndoe@example.com
      

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages