Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to copy webpage into excel using qtp
#7
Solved: 10 Years, 9 Months, 4 Weeks ago Wink 
Hi Harp,

In this case we are not able to use our normal (simple) approach to get the data of web table into Excel Sheet. There are 2 reasons of that:

1. If you add any data of the web table into repository, it's taking "innertext" & "html tag" as the mandatory property. The hierarchy is Browser->Page->WebElement (Data Table is note taken) and RE for Web Element also not working.

2. By using any combination of web table properties, QTP is not recognizing the table while using Descriptive Programming.

But there is an alternative solution:
The below code will give you the content of the table. You have to put that content at correct location in Excel Sheet. You can use properties like "class" etc.


Code:
Set objDesc = Description.Create
   objDesc( "micclass" ).value = "WebElement"         
   objDesc( "html tag" ).value  = "TD"
'   objDesc( "class" ).value  = "in-l-10"      
  
  Set arrObj = Browser("name:=Financial Analysis").Page("title:=Financial Analysis").ChildObjects(objDesc)
  total = arrObj.count
  MsgBox total

  For i=0  to total-1
     data= arrObj(i).GetROProperty("innerhtml")
     print data
  Next


I hope it will work for you....

Smile
Reply


Messages In This Thread
RE: how to copy webpage into excel using qtp - by A.Saini - 10-08-2010, 11:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  webpage WinObject has same name Ananthakumar_S 0 1,573 11-30-2016, 09:48 PM
Last Post: Ananthakumar_S
  Check specific links of a webpage rocky9 1 2,566 06-11-2015, 06:23 PM
Last Post: venkatesh9032
Exclamation How to verify whether pdf is completely loaded or not in webpage nmakkena 1 2,506 08-27-2014, 04:09 PM
Last Post: vinod123
  Handling .NET framework menu in webpage using QTP 10 vishnu1067 0 2,215 05-15-2014, 05:30 PM
Last Post: vishnu1067
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,616 04-18-2014, 10:01 PM
Last Post: Parke

Forum Jump:


Users browsing this thread: 4 Guest(s)