Created
February 13, 2015 16:33
-
-
Save joey-g/1171959ecdd825d28b69 to your computer and use it in GitHub Desktop.
Automation Training Week 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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