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.
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