10-21-2008, 12:40 AM
Hi,
I wrote VBScript to insert values to DataTable before the Execution of the QTP Script.
VBScript :
In QTP Script "HSearch"I am calling a reusable Action "Action1" from another Test "ReuseEvent".
"HSearch" Action Structure:
(ActionName)Login
-->(Called ActionName)ReuseEvent
(ActionName)Search
DataTable has following Sheets:
Global,Login,ReuseEvent,Search
I am using the above VBScript to insert values in Search Sheet.
When the script is executed the values are inserted into Search Sheet. But when the QTP Script is executed it gives error message:
"Cannot identify the specified item of the PriceLow object. Confirm that the specified item is included in the object's item collection. "
I have tried changeing the above code as
But I am not successful in executing the script as it keeps popping message that it cannot identify the Object.
Please help me in how to get this script execute successfully.[/b]
I wrote VBScript to insert values to DataTable before the Execution of the QTP Script.
VBScript :
Code:
Dim Low
Dim High
Low=100000
High=150000
For i=0 to 4
datatable.setcurrentrow(i)
datatable.value("PriceLow",4)=Low
datatable.value("PriceHigh",4)=High
Low=Low+50000
High=High+50000
i=i+1
Next
"HSearch" Action Structure:
(ActionName)Login
-->(Called ActionName)ReuseEvent
(ActionName)Search
DataTable has following Sheets:
Global,Login,ReuseEvent,Search
I am using the above VBScript to insert values in Search Sheet.
When the script is executed the values are inserted into Search Sheet. But when the QTP Script is executed it gives error message:
"Cannot identify the specified item of the PriceLow object. Confirm that the specified item is included in the object's item collection. "
Code:
"Browser("Chicago Top Condos - Real").Page("Chicago Top Condos - Real").WebList("PriceLow").Select DataTable("PriceLow", dtLocalSheet)".
I have tried changeing the above code as
Code:
"Browser("Chicago Top Condos - Real").Page("Chicago Top Condos - Real").WebList("PriceLow").Select DataTable("PriceLow", 4)".
"Browser("Chicago Top Condos - Real").Page("Chicago Top Condos - Real").WebList("PriceLow").Select DataTable("PriceLow", Search)".
But I am not successful in executing the script as it keeps popping message that it cannot identify the Object.
Please help me in how to get this script execute successfully.[/b]