Area元素
HTML tag - <area>
可以用来定位的方法有:
Browser.area(:class,
“area class name”)
Browser.area(:id,
“area id”)
Browser.area(:index,
0)
Browser.area(:name,
“area name”)
Browser.area(:text,
“area text”)
Browser.area(:xpath,
“area xpath”)
Browser.area(:class=>“area
class name”, :id=>“area id”, :index, 0) (Mulitple
Attributes)
Button元素
HTML tag - <button>/<input type=”button”>/<input
type=”image”>/<input type=”reset”>
/<input type=”submit”>
可以用来定位的方法有:
Browser.button(:alt,
“alt button name”)
Browser.button(:class,
“button class”)
Browser.button(:id,
“button id”)
Browser.button(:index,
0)
Browser.button(:name,
“button name”)
Browser.button(:src,
“image button src”) (only for type is image)
Browser.button(:text,
“button text”)
Browser.button(:value,
“button default value”)
Browser.button(:xpath,
“button xpath”)
Browser.button(:class=>“button
class name”, :id=>“button id”, :index, 0) (Mulitple Attributes)
Cell元素
HTML tag - <td>
可以用来定位的方法有:
Browser.td(:alt,
“alt button name”)
Browser.td(:class,
“td class”)
Browser.td(:id,
“td id”)
Browser.td(:index,
0)
Browser.td(:name,
“td name”)
Browser.td(:text,
“td text”)
Browser.button(:xpath,
“td xpath”)
Browser.button(:class=>“td
class name”, :id=>“td id”, :index, 0) (Mulitple
Attributes)
Checkbox元素
HTML tag - <input type=”checkbox”>
可以用来定位的方法有:
Browser.checkbox(:class,
“checkbox class”)
Browser.checkbox(:id,
“checkbox id”)
Browser.checkbox(:index,
0)
Browser.checkbox(:name,
“checkbox name”)
Browser.checkbox(:text,
“checkbox text”)
Browser.checkbox(:value,
“checkbox value”)
Browser.checkbox(:xpath,
“checkbox xpath”)
Browser.checkbox(:class=>“checkbox
class name”, :index, 0) (Mulitple Attributes)