Created
December 9, 2014 10:53
-
-
Save bourg-ismael/4731d7fa76f1b239c013 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env ruby | |
# | |
# Sample Test:Unit based test case using the selenium-client API | |
# | |
require "minitest/autorun" | |
require "rubygems" | |
gem "selenium-client", ">=1.2.18" | |
require "selenium/client" | |
class ExampleTest < Minitest::Test | |
attr_reader :browser | |
def setup | |
@browser = Selenium::Client::Driver.new \ | |
:host => "localhost", | |
:port => 4444, | |
:browser => "*chrome /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome", | |
:url => "http://192.168.33.120", | |
:timeout_in_second => 60 | |
browser.start_new_browser_session | |
end | |
def teardown | |
browser.close_current_browser_session | |
end | |
def test_page_search | |
browser.open "/register" | |
browser.type "name=login", "gcrispyn@assessfirst.com" | |
browser.type "name=password", "toto" | |
browser.click "css=button.btn.btn-primary", :wait_for => :page | |
browser.click "css=a.confirm" | |
browser.click "id=bot2-Msg1" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment