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等等的对象。
文章来源于领测软件测试网 https://www.ltesting.net/