Skip to content

Instantly share code, notes, and snippets.

@joey-g
Created February 13, 2015 16:33
Show Gist options
  • Save joey-g/1171959ecdd825d28b69 to your computer and use it in GitHub Desktop.
Save joey-g/1171959ecdd825d28b69 to your computer and use it in GitHub Desktop.
Automation Training Week 2
# McDonalds Example --------------------------
class McDonalds
def initialize(location)
@location = location
end
def get_location
return @location
end
end
mcds1 = McDonalds.new('Summerville')
mcds2 = McDonalds.new('North Charleston')
mcds3 = McDonalds.new('Columbia')
mcds3.get_location
# WebDriver Example --------------------------
driver = WebDriver.new('Firefox')
driver.navigate_to("http://google.com")
element = driver.find_element('name', 'q')
element.send_keys("Hello WebDriver!")
element.submit
puts driver.title
driver.quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment