Added current_url to SeleniumSession to have the same api for both sessions

This commit is contained in:
Luke Amdor 2009-05-13 10:26:25 -05:00 committed by Mike Gaffney
parent 77fa1bcdb6
commit 7f13a70b4b
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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