Hi All,
I am a newbie to watir. In my application after inserting the record
successfully, i have yo check the data is in the grid or not. I use
below code to check it. This code works good, but sometimes it fails.
page = @ie.frame(:id,"fmWorkflow")
grid = @ie.frame(:id,"fmPending").table(:id,"ifgPending")
tax_code = "wat123"
tax_description = "Test"
tax_category = "commercial"
page.text_field(:id,"txt_typ_cd").set tax_code
page.text_field(:id,"tx_dscrptn").set tax_description
page.text_field(:id,"lkpctgry").set tax_category
page.button(:id,"btnSubmit").click
sleep 3
record_status = false
grid.body(:index, 1).each do | row |
if row.text.include? tax_code.upcase and row.text.include?
tax_description and row.text.include? tax_category
row.flash
record_status = true
break
end
end
if record_status = true
puts "Pass"
else
puts "Fail"
end
So please tell me if any issue on my code. If any other ways are
available to check the table row contents, please let me know.
Thanks,
Prince3105
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---