B
Ban Hoang
Hi ,
=20
I try to write the code to click the button in form but it keep give me
errors. Any one have any idea how to make it work? Thanks!
----
Below is the code:
=20
$ie.frame("bottom").buttonvalue, ":: Login >").click
=20
------
HTMl source: ( this is frame_bottom)
=20
<form name=3Dform_login method=3DPOST action=3Dindex.php target=3D_top>
<tr>
<td align=3Dleft><input name=3Demail type=3Dtext value=3D""
class=3Dfield size=3D15 maxlength=3D50></td>
<td align=3Dleft><font face=3Dverdana =
size=3D1> </font><input
name=3Dpassword type=3Dpassword value=3D"" class=3Dfield size=3D15
maxlength=3D50></td>
<td align=3Dleft><font face=3Dverdana =
size=3D1> </font><input
type=3Dsubmit value=3D":: Login >" class=3Dbutton></td>
</tr>
</form>
=20
This is the error I got:
=20
1) Error:
test_01_LoginTestCase(TC_pulldownBox_Links_Clicks):
Watir::Exception::UnknownObjectException: Unable to locate object, using
value and :: Login >
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
Login_test1.rb:25:in `test_01_LoginTestCase'
=20
1 tests, 0 assertions, 0 failures, 1 errors
=20
I try to write the code to click the button in form but it keep give me
errors. Any one have any idea how to make it work? Thanks!
----
Below is the code:
=20
$ie.frame("bottom").buttonvalue, ":: Login >").click
=20
------
HTMl source: ( this is frame_bottom)
=20
<form name=3Dform_login method=3DPOST action=3Dindex.php target=3D_top>
<tr>
<td align=3Dleft><input name=3Demail type=3Dtext value=3D""
class=3Dfield size=3D15 maxlength=3D50></td>
<td align=3Dleft><font face=3Dverdana =
size=3D1> </font><input
name=3Dpassword type=3Dpassword value=3D"" class=3Dfield size=3D15
maxlength=3D50></td>
<td align=3Dleft><font face=3Dverdana =
size=3D1> </font><input
type=3Dsubmit value=3D":: Login >" class=3Dbutton></td>
</tr>
</form>
=20
This is the error I got:
=20
1) Error:
test_01_LoginTestCase(TC_pulldownBox_Links_Clicks):
Watir::Exception::UnknownObjectException: Unable to locate object, using
value and :: Login >
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click'
Login_test1.rb:25:in `test_01_LoginTestCase'
=20
1 tests, 0 assertions, 0 failures, 1 errors