The code below,I want it's loop to open popup ie window and select an item,
when frm.image(:id,"select").click,trigger a javascript to fill
$modal.frame(:name,'ifrmsingle').text_field with selected item, and close
window ie_select.
When I run it ,it did not fill $modal.frame(:name,'ifrmsingle').text_field
When I debug it in eclipse ,it can fill
$modal.frame(:name,'ifrmsingle').text_field
I don't know why, has someone meet this before?
Here's the code
$myData.each do |record|
func_collist = record["func_collist"]
atxt = record["atxt"]
ie_select = Watir::IE.attach(:url,/layoutPage/)
sleep 3
puts "normal sele"
frm = ie_select
#set query list's value and do query
frm.document.all("func_collist").value="#{func_collist}"
frm.document.all("query_keyword").value="#{atxt}"
frm.button(:name,"btn_keyquery").click
sleep 3
#loop to find the right row in query result and click
t = frm.table(:id,"tblgrid")
catch(:findsub){
t.each do |r|
r.each do |c|
if(c.text=="#{atxt}")
c.click
puts "find txt"
frm.image(:id,"select").click
puts "click select"
throw :findsub
end
end
end
}
end
$modal.frame(:name,'ifrmsingle').button(:id,'save').click
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general