Improved test output.
This commit is contained in:
parent
daaf5ab3cb
commit
b6ddca0f88
1 changed files with 4 additions and 4 deletions
|
@ -188,20 +188,20 @@ class TestCase < Test::Unit::TestCase
|
||||||
elsif action[:element] == :title
|
elsif action[:element] == :title
|
||||||
title = instance.title
|
title = instance.title
|
||||||
if title =~ /#{action[:value]}/i
|
if title =~ /#{action[:value]}/i
|
||||||
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in title" )
|
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in title '#{title}'" )
|
||||||
else
|
else
|
||||||
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in title" )
|
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in title '#{title}'" )
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
elsif action[:element] == :cookie
|
elsif action[:element] == :cookie
|
||||||
cookies = instance.manage.all_cookies
|
cookies = instance.manage.all_cookies
|
||||||
cookies.each {|cookie|
|
cookies.each {|cookie|
|
||||||
if cookie.to_s =~ /#{action[:value]}/i
|
if cookie.to_s =~ /#{action[:value]}/i
|
||||||
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in cookie" )
|
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in cookie '#{cookie.to_s}'" )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in cookie" )
|
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in cookie '#{cookie.to_s}'" )
|
||||||
return
|
return
|
||||||
elsif action[:element] == :alert
|
elsif action[:element] == :alert
|
||||||
element = instance.switch_to.alert
|
element = instance.switch_to.alert
|
||||||
|
|
Loading…
Reference in a new issue