-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
= form_tag :search, method: :get, id:'search' do |f| | |
= text_field_tag :q, '', placeholder:'City, address, or zip code' | |
= hidden_field_tag :c, '' | |
= submit_tag "Go" |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |