GithubHelp home page GithubHelp logo

isabella232 / saucecon19-advanced-selenium-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sauce-archives/saucecon19-advanced-selenium-workshop

0.0 0.0 0.0 61.51 MB

A repository containing hands-on source code, as well as detailed guides for the SauceCon 2019 "Advanced Selenium" workshop

License: MIT License

Java 100.00%

saucecon19-advanced-selenium-workshop's Introduction

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

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 [email protected]
      

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 [email protected]
      

saucecon19-advanced-selenium-workshop's People

Contributors

titusfortner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.