Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to copy webpage into excel using qtp
#1
Solved: 11 Years, 3 Months, 4 Weeks ago Sad 
i am fairly a new user of qtp. i am trying to record a script which should copy the table in a webpage and its data. the copied data should be pasted into an excel sheet as unicode text (using paste special function of excel). i am facing problem in doing this as on running the script i am getting object not visible error. can someone please help me in figuring this out?

the same process is used for 1992 times. and the webpage is opened through url's stored in local datasheet.

Code:
For i=0 to 1991


SystemUtil.Run "C:\Program Files\Mozilla Firefox\firefox.exe","","c:\documents and settings\Harp ","open"




Dim url1, url2, url3, url

url1= datatable.Value("A", dtlocalsheet)
url2=datatable.Value("B",dtLocalsheet)
url3= datatable.value("C",dtlocalsheet)

url= url1&url2&url3

Window("Mozilla Firefox").WinObject("MozillaWindowClass").Type url
Window("Mozilla Firefox").WinObject("MozillaWindowClass").Type  micReturn
wait(4)
Window("Mozilla Firefox").WinObject("MozillaWindowClass_2").Drag 82,204
Window("Mozilla Firefox").WinObject("MozillaWindowClass_2").Drop 1000,457
'Window("Mozilla Firefox").WinObject("MozillaWindowClass_2").Click 969, 353, micRightBtn
'Window("Window").Click 35,12
'SystemUtil.Run "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE","","",""
'Window("Book1").Activate
'Window("Book1").WinObject("Book1").Click 62,50
'Window("Book1").WinObject("Book1").Click 62, 50, micRightBtn
'Window("Book1").Window("Window").WinObject("NetUIHWND").Click 79,73
'Window("Book1").Window("Paste Special").Click 118,83
'Window("Book1").Window("Paste Special").Click 386,305
window("Mozilla Firefox").Close



wait(8)



next
Reply


Messages In This Thread
how to copy webpage into excel using qtp - by harp - 10-07-2010, 09:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  webpage WinObject has same name Ananthakumar_S 0 1,699 11-30-2016, 09:48 PM
Last Post: Ananthakumar_S
  Check specific links of a webpage rocky9 1 2,715 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,685 08-27-2014, 04:09 PM
Last Post: vinod123
  Handling .NET framework menu in webpage using QTP 10 vishnu1067 0 2,342 05-15-2014, 05:30 PM
Last Post: vishnu1067
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,816 04-18-2014, 10:01 PM
Last Post: Parke

Forum Jump:


Users browsing this thread: 4 Guest(s)