Added current_url to SeleniumSession to have the same api for both sessions
This commit is contained in:
parent
77fa1bcdb6
commit
7f13a70b4b
@ -55,6 +55,10 @@ module Webrat
|
||||
selenium.get_html_source
|
||||
end
|
||||
|
||||
def current_url
|
||||
selenium.location
|
||||
end
|
||||
|
||||
def click_button(button_text_or_regexp = nil, options = {})
|
||||
if button_text_or_regexp.is_a?(Hash) && options == {}
|
||||
pattern, options = nil, button_text_or_regexp
|
||||
|
@ -10,6 +10,7 @@ class WebratTest < ActionController::IntegrationTest
|
||||
test "should visit pages" do
|
||||
visit root_path
|
||||
assert_contain("Webrat Form")
|
||||
assert URI.parse(current_url).path, root_path
|
||||
end
|
||||
|
||||
test "should submit forms" do
|
||||
|
Loading…
Reference in New Issue
Block a user