Webinar – Intro to Selenium2Library & Robot Framework (also Cucumber & Gherkin)

Webinar – Intro to Selenium2Library & Robot Framework (also Cucumber & Gherkin)

I recently attended a webinar on the uTest platform, which was titled “Intro to Selenium2Library & Robot Framework”. I hadn’t heard of Selenium2Library or the Robot Framework, so this was a really useful intro to both of these at once. Also there was some information on Cucumber and Gherkin, as used in Acceptance Testing. You can check out the webinar on YouTube.

I’ll briefly outline what I learnt here, for future reference.

Robot Framework

Selenium2Library

  • Python implementation of Selenium WebDriver, for use with Google Robot Framework
  • Uses Open Browser commands and BuiltIn library

Installation on Mac OSX

Robot Framework installation:

  • Requires Python – already on most Macs
  • To install Robot Framework – use pip install robotframework
  • To check its been installed – type pybot –version

Selenium2Library installation:

  • Use github
  • or use easy_install

Cucumber & Gherkin

  • Cucumber is a tool for automated Acceptance Tests
  • Gherkin is used in Acceptance Testing and is the language used in Cucumber
  • Natural language format, similar to user stories
  • Agile way of specifying software requirements
  • Often specified by business and then given to developers

Example Keywords in Gherkin

  • Scenario …
  • Given …
  • When …
  • Then …
  • AND …
  • BUT …

Gherkin Example

Given I have an existing blog account
When I login as user Bert
Then I can see blog welcome page

My Observations on the Robot Framework

  • Robot Framework coding looks a lot like Python coding, with the same indents and spacing – so easy to read, if you know Python.
  • The Robot Framework files shown in the webinar had the format of:
  • Settings
  • Variables
  • Keywords
  • Was described as a good tool to enable non-technical testers to write Gherkin tests – with developers then adding keywords (and processing coding) that the non-technical testers may need for their tests.