Skip to content

lazycoderio/Basic-Selenium-Java

Repository files navigation

Join the chat at https://gitter.im/lazycoderio/sample-java-jenkins codecov Codacy Badge Dependency Status Build Status

Using this Project

This project is using the latest Selenium Bindings.

Setup

Run these commands depending on your base OS.

On Mac OS

  1. Install Homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install Caskroom brew tap caskroom/cask
  3. If you dont have the Java Development Kit (JDK) run this command brew cask install java
  4. Install Maven brew install maven
  5. Run ./mac_install_browsers.sh

Running Tests

The following commands are instructions on how to run the tests

From CLI

mvn test -Dsurefire.suiteXmlFiles=mac-only.xml on a mac

Intellij Idea

There is a shared run configuration that has the maven target setup and another with a sample built in NUnit test runner option.

Safari Test

Safari requires the following steps to enable Selenium Webdriver tests to run:

  1. Open Safari Preferences
  2. Go to the Advanced Tab
  3. Check the box at the bottom "Show Develop menu in menu bar"
  4. Click on the Develop menu
  5. Click on "Allow Remote Execution"

Now Safari tests will work.

If running tests only locally you can remove delete // from the @Test line of the Safari class.

About

Sample Selenium Project for Java basic config only

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •