This project is using the latest Selenium Bindings.
Run these commands depending on your base OS.
Copy this bootstrap script and run it in a Terminal shell window:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/lazycoderio/Basic-Selenium-Java/master/mac-bootstrap.sh)"
It installs the following if it is not already installed:
- Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Caskroom
brew tap caskroom/cask
- If you dont have the Java Development Kit (JDK) run this command
brew cask install java
- Install Maven
brew install maven
- Run
./mac_install_browsers.sh
The script also runs the test.
This is currently having a few issue
-
Download the zip file or clone this repository.
-
Navigate to the unzipped folder within the file browser.
-
Right-Click on
windows_install.bat
and selectRun as Administrator
-
Test the installation by running the following from a command window in the directory of this project
mvn test -Dsurefire.suiteXmlFiles=windows-only.xml
- The script should install Chocolatey the Windows package manager.
- Install latest versions of a. Firefox b. Chrome c. PhantomJS
- Selenium drivers for the above and the Edgedriver
The following commands are instructions on how to run the tests
On a Mac:
mvn test -Dsurefire.suiteXmlFiles=mac-only.xml
There is a shared run configuration that has the maven target setup and another with a sample built in NUnit test runner option.
Safari requires the following steps to enable Selenium Webdriver tests to run:
- Open Safari Preferences
- Go to the Advanced Tab
- Check the box at the bottom "Show Develop menu in menu bar"
- Click on the Develop menu
- 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.