您的位置:軟件測(cè)試 > 開源軟件測(cè)試 > 開源功能測(cè)試工具 > Watir
如何在 Watir 中識(shí)別各種 HTML 對(duì)象
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2014/3/6 13:23:24 ] 推薦標(biāo)簽:Watir HTML 對(duì)象

可以用來定位的方法有:

Browser.textfield(:class,  “textfield class”)

Browser.textfield(:id,  “textfield id”)

Browser.textfield(:index,  0)

Browser.textfield(:name,  “textfield name”)

Browser.textfield(:text,  “textfield text”)

Browser.textfield(:value, “textfield value”)

Browser.textfield(:xpath,  “textfield xpath”)

Browser.textfield(:class=>“textfield class name”,  :index, 0)(Mulitple Attributes)

Textarea元素

HTML tag - <textarea>

 

可以用來定位的方法有:

Browser.textarea(:class,  “textarea class”)

Browser.textarea(:id,  “textarea id”)

Browser.textarea(:index,  0)

Browser.textarea(:name,  “textarea name”)

Browser.textarea(:text,  “textarea text”)

Browser.textarea(:value, “textarea value”)

Browser.textarea(:xpath,  “textarea xpath”)

Browser.textarea(:class=>“textarea class name”,  :index, 0)(Mulitple Attributes)

 

ul元素

HTML tag - <ul>

 

可以用來定位的方法有:

Browser.ulist(:class,  “ulist class”)

Browser.ulist(:id,  “ulist id”)

Browser.ulist(:index,  0)

Browser.ulist(:name,  “ulist name”)

Browser.ulist(:text,  “ulist text”)

Browser.ulist(:xpath,  “ulist xpath”)

Browser.ulist(:class=>“ulist class name”,  :index, 0)(Mulitple Attributes)

 

New Browser Windows對(duì)象

可以用來定位的方法有:

Browser.window(:href,  “new window href”)

Browser.window(:title,  “new window title”)

上一頁1234567下一頁
軟件測(cè)試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd