Created
February 20, 2015 16:46
-
-
Save joey-g/26ad1dea07a2e4ccf7c1 to your computer and use it in GitHub Desktop.
Automation Training Week 3
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
# WebDriver API Examples | |
driver = WebDriver.new('Chrome') | |
# Example of sending keystrokes to an input field. | |
input_el = driver.find_element(<some_input_selector_goes_here>) # <-- Returns an instance of the WebElement class. | |
input_el.send_keys('Hey') # <-- Sends keystrokes to the retrieved input WebElement object. | |
# Example of clicking a button. | |
button_el = driver.find_element(<some_button_selector_goes_here>) # <-- Returns an instance of the WebElement class. | |
button_el.click() # <-- Clicks the retrieved button WebElement object. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment