Skip to content

Instantly share code, notes, and snippets.

@titusfortner
Created December 29, 2014 18:22
Show Gist options
  • Save titusfortner/7de3c8a575e9fb2d597e to your computer and use it in GitHub Desktop.
Save titusfortner/7de3c8a575e9fb2d597e to your computer and use it in GitHub Desktop.
Watir Webdriver
require 'watir-webdriver'
b = Watir::Browser.new
b.goto "#{your_url}"
# Match first span with class 'title'
b.span(class: 'title')
# Array of spans matching class 'title'
b.spans(class: 'title')
# Match span with class 'title' by index
b.span(class: 'title', index: '1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment