HTML Buttons
ie.button(:value, "Click Me").click
Forms
ie.form(:name, "form_name").submit
ie.form(:action, "action_name").submit
Frames
ie.show_frames# show all the frames existed in the same page
ie.frame("menu").link(:text, "Click Menu Item").click# operate in frame
Images
ie.image(:name, “image_name”).click
Tables
ie.table(:id, “table_id”)
Manipulate row
row = ie.table(:index, 2)[2]
count=1
row.each do |cell|
#fill in code to do an action or verifaction
end
Manipulate cell
cell = ie.table(:index, 2)[2][2]
我們將Table看作一個頁面, 我們能在上面檢索buttons,images,links,tables等等的對象。
文章來源于領測軟件測試網 http://www.kjueaiud.com/