2012-02-17 9 views

答えて

4

Hereにアクセスしてください。あなたはあなたの答えを得るでしょう、これはQTPでPDFを扱うためのmenthodの1つです。また、キーi、e、Ctrl + a、Ctrl + cを押してデータをクリップボードにコピーすることにより、データを取り出すことができます

サンプル機能PDFからデータを取得する場合PDFレポートは、その作成時点のDataTable

Public function CopyPDFData(sDestinationFile)  
Dim clip, strText, nCT, fso 

nCT = DataTable("bPDFCreationTime", dtLocalSheet) 
If nCT ="" Then nCT=1 
Browser("CreationTime:=" & nCT).Sync 

Browser("CreationTime:=" & nCT).FullScreen    
wait(2) 
Browser("CreationTime:=" & nCT).WinObject("object class:=AVL_AVView", "text:=AVPageView").Type micCtrlDwn + "a" + micCtrlUp 
wait(4) 
Browser("CreationTime:=" & nCT).WinObject("object class:=AVL_AVView", "text:=AVPageView").Type micCtrlDwn + "c" + micCtrlUp 
wait(4) 

Set clip = CreateObject("Mercury.Clipboard") 
strText = clip.GetText 
clip.Clear 

Set fso = CreateObject("Scripting.FileSystemObject") 
Set strfile = fso.CreateTextFile(sDestinationFile, True) 
strfile .Write strText 
strfile .Close 
Browser("CreationTime:=" & nCT).sync 
Browser("CreationTime:=" & nCT).close 
End Function 

に渡されるQTP

使用してPDFレポートのテストのための他の選択肢もありますが、これはあなたの問題を解決するかどうか、私に教えてくださいBroweserで開かれています
関連する問題