Below is my coderequire 'watir'
include Watirrequire 'methods/login'$au3 = WIN32OLE.new("AutoItX3.Control")
$au3.Opt("MouseCoordMode",0)admin_login("admin","123456")$ie.link(:text,"License generation").clicksleep(1)
puts "ie.document.frames.length is "
puts $ie.document.frames.length ####### the system will print 0
table = $ie.table(:index, 6)
tableCel = table.body(:index, 1)[3][1].focus()
$au3.Send("{TAB 2}{ENTER}")sleep(10)
puts "ie.document.frames.length is "
puts $ie.document.frames.length ######## the system will print niltable1 = $ie.table(:index, 6)
tableCel1 = table1.body(:index, 1)[12][1].focus()
$au3.Send("{TAB 2}{ENTER}")sleep(1)
puts "ie.document.frames.length is "
puts $ie.document.frames.length ####### the system will print 1
a = $ie.contains_text("Please at least enter information into one of the domain and IP address fields")
b = $ie.contains_text("This information is required")
puts aif a && b
puts "the information of 'Domain', 'IpAddress' and 'Quantity of CAL' fields are required"
else
puts "some errors appeared..."
end$ie.text_field(:name,"domain").set("a.com")
$ie.text_field(:name,"ipAddress").set("1.1.1.1")
$ie.text_field(:name,"calQuantity").set("aaa")table1 = $ie.table(:index, 6)
tableCel1 = table1.body(:index, 1)[12][1].focus()
$au3.Send("{TAB 2}{ENTER}")
sleep(1)
c = $ie.contains_text("This information should be numeric")
if c
puts "'Quantity of CAL' should be numeric"
puts "test of form_validation is successful"
else
puts "some errors appeared..."
end
puts "ie.document.frames.length is "
puts $ie.document.frames.length ####### the system will print 1As you see above in the four parts of this code I print the value of 'ie.document.frames.length'and the value was changed I want to know what the 'ie.document,frames,length' means and why the value turned to 'nil' in the second partThank you very muchjim
Start your day with Yahoo! - make it your home page
Start your day with Yahoo! - make it your home page
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
