こんにちは私は以下のコードを使って私のウェブページをテストしています。QTPは、レコーディング中にウェブテーブルを識別します。しかし、同様のプロパティがオブジェクトリポジトリで定義されている場合、テーブルは特定されません
ExecuteFile "H:\Asma\wp_CommonFunctions.vbs"
Set Brw_Composer = CreateObjectDescription("name:=Composer - Test Accounts")
Set Page_Composer = CreateObjectDescription("title:=Composer.*,url:=http://sharepoint.btfin.com.*")
Set tbl_Composer_HostBrand = CreateObjectDescription("html tag:=TABLE,Value:=36,text:=Host Brand.*,Enable Smart Identification:=True,rows:=16")
Set tbl_Composer_Environments = CreateObjectDescription("html tag:=TABLE,Value:=32")
BT_SVP_Path= "http://sharepoint.btfin.com/it/simt/home/environments%20tech/Composer/Test%
SystemUtil.Run BT_SVP_Path
' Get the value of CAN under
cellValue=Browser("Composer - Test Accounts").Page("Composer - Test Accounts").WebTable("Host Brand").GetCellData(12,4)
'Open SVP ACC2 Ingress link
'Set obj = Browser(Brw_Composer).Page(Page_Composer).Webtable(tbl_Composer_Environments)
If (Browser(Brw_Composer).Page(Page_Composer).Webtable(tbl_Composer_Environments)).Exist Then
msgbox" success"
else
msgbox "failure"
End If
'******************************************************************
Function CreateObjectDescription(StrProperties)
Dim objDescription
Dim ObjArr
Dim PropCount
Dim ObjProperty
Set objDescription=Description.Create
ObjArr=split(StrProperties,",")
For PropCount=0 to ubound(ObjArr)
ObjProperty=split(ObjArr(PropCount),":=")
objDescription(ObjProperty(0)).value=ObjProperty(1)
Next
Set CreateObjectDescription=objDescription
End Function
Webtablesは、その性質がruntime.If中に指定されている場合、私は、コードが正常に動作し、オブジェクトリポジトリにそのプロパティを追加し、実行時に特定されていません。 助けてください。私は私のwebappをテストするためにIE 6を使用しています。
助けてくださってありがとうございます。私はブラウザとページを識別することができますが、ウェブテーブルは識別できません。私は他に何かできますか? –
@asmarazaviあなたは私の提案を試みましたか?結果は何でしたか? – Motti