Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DataTable Local Sheet Identification Issue
#1
Hi,
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
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. "
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]
Reply
#2
From your well documented post it looks as though the problem is in recognizing the PriceLow object not in pulling a value from the datatable.
Reply
#3
In my qtp,
when i value is zero, it uses first row of datatable when i value is zero and one
so you are resetting first row in 4th sheet as 100000+50000

solution: loop with i=1 (instead of 0)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 2,074 01-05-2020, 10:03 PM
Last Post: Bhuvana
Question QTP not performing iterations based on local data sheet Breaker 18 60,132 01-25-2016, 04:32 PM
Last Post: arunshuklainbox
  Local System Monitor kbhargava505 0 2,819 10-16-2015, 12:52 PM
Last Post: kbhargava505
Shy Java Swing application objects identification issue kavithaminu 2 4,025 07-22-2015, 02:07 AM
Last Post: uftuser18
  How to Create and use local repository Sourabh146 2 3,173 01-28-2014, 10:56 PM
Last Post: jacosta

Forum Jump:


Users browsing this thread: 1 Guest(s)