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
|
selenium.get_html_source
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def current_url
|
||||||
|
selenium.location
|
||||||
|
end
|
||||||
|
|
||||||
def click_button(button_text_or_regexp = nil, options = {})
|
def click_button(button_text_or_regexp = nil, options = {})
|
||||||
if button_text_or_regexp.is_a?(Hash) && options == {}
|
if button_text_or_regexp.is_a?(Hash) && options == {}
|
||||||
pattern, options = nil, button_text_or_regexp
|
pattern, options = nil, button_text_or_regexp
|
||||||
|
@ -10,6 +10,7 @@ class WebratTest < ActionController::IntegrationTest
|
|||||||
test "should visit pages" do
|
test "should visit pages" do
|
||||||
visit root_path
|
visit root_path
|
||||||
assert_contain("Webrat Form")
|
assert_contain("Webrat Form")
|
||||||
|
assert URI.parse(current_url).path, root_path
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should submit forms" do
|
test "should submit forms" do
|
||||||
|
Loading…
Reference in New Issue
Block a user