Setting up the Selenium bits

After the project is created, you need to setup the Selenium dependency, in order to use the library’s functionality. Make sure you always have the latest Selenium libraries available. The constant upgrade of the modern browsers  might make some Selenium features unavailable or not working properly with older library versions.

Browser Releases

To see what browser releases are scheduled in the future, you can check out these links:

Browser Binaries

The list of the latest browser binaries can be found here:

  • For Chrome: http://chromedriver.storage.googleapis.com/index.html . In order to run Selenium tests on Chrome, you will need to download the latest binary version, and attach it to your project.  You will need to copy this binary to your project, preferably into the following location: /src/test/resources/browserBinaries.
  • For Firefox you will not need to download/add to your project any binaries, as Selenium will use the default location of the Firefox installation you have on your machine to run in the browser.

WebElements

Testing with Selenium means interacting with a web page’s HTML code by means of a browser instance. The most common actions you can perform from Selenium are: clicking on a link, typing text into an input field, selecting items from a dropdown, selecting a radio button or ticking a checkbox. The Selenium elements holding the HTML bits that you will interact with are of type ‘webElement’. The webElements are declared either with XPATH or CSS selectors, as described in the next steps of this tutorial: https://iamalittletester.wordpress.com/2014/02/25/xpath-selectors/ and https://iamalittletester.wordpress.com/2014/02/25/css-selectors/ . Once a webElement declared, you can use the Selenium commands directly on it, to click, type or select values it contains, as described here: https://iamalittletester.wordpress.com/2014/02/25/creating-the-page-objects/.

But before that, a bit of introduction to HTML is neccessary: https://iamalittletester.wordpress.com/2014/02/25/html-and-selenium-an-introduction/.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s