СѾͷamy ·¢±íÓÚ 2012-12-24 11:07:33

ÈçºÎ»ñÈ¡ÏÂÀ´²Ëµ¥µÄÖµ£¿

ÓÐÕâô¸ö°´Å¥£¬µã»÷ÏÂÀ­°´Å¥£¬»áµ¯³öÏÂÀ­Öµ£¬Èç¹û»ñÈ¡

Õâ¸öµÄhtmlµÄ´úÂëÈçÏÂ:

cu_zhuang ·¢±íÓÚ 2012-12-24 11:34:18

Õâ¸ö²»»á£¬ÖªµÀµÄÈË°ïæ½â´ðÏÂÁË~

СѾͷamy ·¢±íÓÚ 2012-12-24 11:34:29

ÔÚÍøÉÏ¿´µ½ÓÃgetelementbyid·½·¨
Set Olilist=Browser("ÈËÈËÍø - ÎÒµÄÁôÑÔ°å").Page("ÈËÈËÍø - ÎÒµÄÁôÑÔ°å").Object.getElementById("dropmenuHolder").ChildNodes.ChildNodes
Ìáʾ¶ÔÏó²»Ö§³Ö£¬ChildNodes.ChildNodes·½·¨

geek ·¢±íÓÚ 2012-12-24 12:05:54

Äã¿ÉÒÔÖ±½Ó¿´µã»÷ºóµ¯³öµÄÏÂÀ­²Ëµ¥Äܲ»Äܱ»SPYʶ±ðµ½¡£ÄÜʶ±ðµ½µÄ»°¾Í¿ÉÒÔÖ±½Óµ÷Óã¬Èç¹ûÒ³ÃæÖеÄÏàͬµÄÔªËؾͶ༸¸öÆ¥ÅäÖµÀ´Ê¶±ð¡£¿´¿´ÕâÑùÐв»£¿¡£¡£

ºÚÓð¼À ·¢±íÓÚ 2012-12-24 15:44:53

»Ø¸´ 3# СѾͷamy


    ÕâÊÇÈËÈËÍøÉϵģ¿ ¹«Ë¾¿ª²»ÁË£¬ÎÒ»ØÈ¥ÔÙ¿´ÏÂ

СѾͷamy ·¢±íÓÚ 2012-12-24 15:50:59

»Ø¸´ 4# geek


    spyʶ±ð²»µ½

СѾͷamy ·¢±íÓÚ 2012-12-24 15:51:20

»Ø¸´ 5# ºÚÓð¼À


    Êǵģ¬ÈËÈËÍøÉϵÄÁôÑÔ°æ

xjwldlover ·¢±íÓÚ 2012-12-24 18:01:44

1£¬spyʶ±ð²»ÁË¡£ÊÇ˵ʶ±ð²»³É±ê×¼µÄweb¿Ø¼þ£¬»¹ÊÇ˵Äãspyµã²»ÉÏÈ¥¡£Èç¹ûÊǺóÕߣ¬ÔÚspyµÄʱºò°´×¡ctrl¿ÉÒÔ²Ù×÷Ò³Ã棬ȻºóËÉ¿ªÒ³Ãæspy²é¿´¡£
2£¬ChildNodes.ChildNodes Ã÷ÏÔÊÇ´íµÄ£¨ÎÒûÕâôÊÔ¹ý£©£¬childNodesÊǸö¶ÔÏ󼯺ϣ¬ºó¸úchildNodes·½·¨£¬Ã»ÓÐÒÀ¾Ý¡£
3£¬µ±Ê¹ÓÃa.b.c.d.function(e)·¢Éú´íÎó£¬ÌáÎÊʱӦ·¢³öab c d ¸÷¼¶¶ÔÏóµÄexistÊ**¬ÖÁÉÙÓ¦¸ø³ö×îºóÒ»²ã¶ÔÏóµÄ¸ÃÊ*¸ø³ö×îºóÒ»²ã¶ÔÏóµÄspy¡¾ºÍ¡¿QTP watchÐÅÏ¢£¬×îºÃ¸ø³ö¶ÔÏódocumentElementµÄÐÅÏ¢

Ì©È» ·¢±íÓÚ 2012-12-24 22:20:43


½«2¸öchildnodes·Ö¿ªÐ´¾ÍºÃÁË¡£

СѾͷamy ·¢±íÓÚ 2012-12-25 13:53:12

»Ø¸´ 9# Ì©È»


    µ«ÊǹؼüÊÇÕâ¸ödivûÓÐidºÅ
    Õâ¸öÔ´´úÂëÈçÏÂ

xjwldlover ·¢±íÓÚ 2012-12-25 14:22:06

±¾²ãÔªËØûÓÐid£¬¿ÉÒÔʹÓÃÍâ²ãÔªËصÄid,±ÈÈç dropmenuHolder£¬Ô­ÀíÊÇÒ»ÑùµÄ

СѾͷamy ·¢±íÓÚ 2012-12-25 15:05:17

»Ø¸´ 11# xjwldlover


   Ã÷°×ÁË£¬Ð»Ð»¡£

СѾͷamy ·¢±íÓÚ 2012-12-25 15:08:32

µ«ÊÇ£¬ÎªÊ²Ã´ÔËÐеÄʱºò£¬»á±¨Õâ¸ö´íÎóÄØ£¿ÊÇÎÒµçÄÔµÄÅäÖÃÓйØϵÂð£¿

×îÖÕµÄдµÄ´úÂëÈçÏÂ:
Set list=Browser("ÈËÈËÍø - ÎÒµÄÁôÑÔ°å").Page("ÈËÈËÍø - ÎÒµÄÁôÑÔ°å").Object.getElementById("dropmenuHolder").ChildNodes
print list.item(0).Nodename
Set list1=list.item(1).ChildNodes
print list1.item(0).Nodename
For i=0 to list1.length-1
print list1.item(i).innertext
Next
Set list1=nothing
Set list=nothing

xjwldlover ·¢±íÓÚ 2012-12-25 16:29:48

°²×°²¹¶¡°ü QTP_00604.EXE Ó¦¸Ã¿ÉÒÔ½â¾ö

wuyunyue ·¢±íÓÚ 2012-12-25 17:18:41

±¾Ìû×îºóÓÉ wuyunyue ÓÚ 2012-12-25 17:30 ±à¼­

ÎҼǵÃÓÐÒ»¸ö·½·¨ÊÇÖ±½Ó»ñÈ¡hrefµÄ.¶ÔÓÚhrefµÄ²»ÍƼöÄãÕâôµÄÖ±½ÓץȡԪËØ.Ö±½Ó»ñÈ¡ÔªËØÁ¬½Ó¸üÖ±½Ó.select¿òÌåÊÇ¿ÉÒÔÖ±½ÓÓÃÖµÀ´Ä£Ä⶯×÷µÄ.ÎÒÒ»»áÕÒÕÒÎÒÒÔǰдµÄ½Å±¾.ת·¢¸øÄã.Ñ°ÕÒurlÀàËÆÕâÖÖ.
String activityId =lancer.get().getAttribute(link_xpath + "/@href")ÏÂÀ­¿òÌåµÄ¿ÉÒÔÓÃÀàËÆ:select 'generalRating',strGeneralRating.
¶àÕÒÕÒÄãµÄ·½·¨¡£

СѾͷamy ·¢±íÓÚ 2012-12-26 09:59:38

»Ø¸´ 14# xjwldlover


   ÎÒÕâ¸öÊÇ9.2°æ±¾µÄ

СѾͷamy ·¢±íÓÚ 2012-12-27 14:41:09

»Ø¸´ 14# xjwldlover


    ÎÒµÄÊÇqtp 9.2°æ±¾µÄ£¬Õâ¸ö²¹¶¡Ó¦¸ÃÊÇ10.0°æ±¾µÄ°É

ºÚÓð¼À ·¢±íÓÚ 2012-12-27 15:19:56

»Ø¸´ 17# СѾͷamy


    ¸Ã»»10ÁË£¬±ðÈ˶¼ÓÃÉÏ11.5ÁË¡£

ÇØ·Æ ·¢±íÓÚ 2012-12-27 16:29:04

¿´¿´ÄãÊDz»ÊÇÏëÎÊÕâ¸öÎÊÌ⣺
ÏÖÔÚÎÞ·¨ÆË×½µ½ÏÂÀ­¿òµÈ¿Ø¼þ
ÎÒ¼òµ¥µÄдÁËһϣ¬²»¶®µÃ»°£¬¿ÉÒÔÁôÑÔºÃ
http://bbs.51testing.com/thread-883402-1-1.html

yzwangxf ·¢±íÓÚ 2012-12-28 14:47:32

Èç¹ûQTPʶ±ð³ö¶ÔÏóÊÇWebList£¬ÄǾͿÉÒÔÓÃÒÔϵİ취À´ÊµÏÖ£º
Àý×Ó£º
fromPortCount = Browser("Browser").Page("Find a Flight: Mercury").WebList("fromPort").GetROProperty("items count")
toPortCount = Browser("Browser").Page("Find a Flight: Mercury").WebList("toPort").GetROProperty("items count")

DataTable.AddSheet("FromPort")
Set Sheet = DataTable.GetSheet("FromPort")
For i=1 to fromPortCount
           fromPortName = Browser("Browser").Page("Find a Flight: Mercury").WebList("fromPort").GetItem(i)
           'Sheet.SetCurrentRow i
       Sheet.AddParameter "fromPort",fromPortName
           'DataTable.Value(i-1,"FromPort") = fromPortName
Next

DataTable.AddSheet("ToPort")
Set Sheet = DataTable.GetSheet("ToPort")
For i=1 to toPortCount
           toPortName = Browser("Browser").Page("Find a Flight: Mercury").WebList("toPort").GetItem(i)
       Sheet.AddParameter "toPort",toPortName
          'DataTable.Value(i,"ToPort") = toPortName
Next
Ò³: [1] 2
²é¿´ÍêÕû°æ±¾: ÈçºÎ»ñÈ¡ÏÂÀ´²Ëµ¥µÄÖµ£¿