The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

Pages: 1
be_priti
Junior Member


Reged: 02/25/05
Posts: 4
Loc: Pune
"Retrieve Datatable value operation failed" ,"AgentName" column does not exist
      #215870 - 11/25/05 01:02 AM

Hello,
I have written a code to set up the ObjectRepository path (shared)and to set the datatable path(external excel file).
After setting the object reporitory and Datablepath,the excel sheet which i have created is getting imported to the datable.In the same script,Iam trying to parameterize the simple Flight Login screen,where I am entering the Agent name and Password.
I have placed the data in the Global sheet(in excel sheet)which gets imported to the datatable when I set the path through code.
Now when i run my script for the first time,Its sets the Object repository path,sets the databale path to the one which I have specified and at the same time it imports the data to the Global data sheet.but when it comes to the code to enter the Agent name.i.e. when it tries to retrieve the data for the field Agentname iam getting the error "Retrieve Datatable.value operation failed" ,<AgentName> column does not exist"
folowing is the code which Iam using to set he excel sheet path and retrieve the value from the datatable:
Set qtp= createObject("QuickTest.Application")

qtp.launch

qtp.visible=true
qtp.Test.Settings.Resources.DataTablePath ="C:\My_Excel.xls"
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"

Dialog("Login").WinEdit("Agent Name:").Set Datatable("AgentName",dtGlobalsheet)
Dialog("Login").WinEdit("Password:").SetSecure datatable("Password1",dtGlobalsheet)
Dialog("Login").WinEdit("Password:").Type micReturn
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
Can any one please guide me,I dont know what step I am missing?
I am new to QTP
Thanks,

[ 11-25-2005, 01:10 AM: Message edited by: be_priti ]


Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist
      #215871 - 11/25/05 03:00 AM

Where are you running this AOM code from?

Mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Santosh N
Newbie


Reged: 06/09/05
Posts: 21
Loc: Bangalore
Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist
      #215872 - 11/25/05 03:07 AM

Copy the column name corresponding to 'AgentName' from the excel and paste it in this line of code Dialog("Login").WinEdit("Agent Name:").Set Datatable("AgentName",dtGlobalsheet). See that there are no spaces in the cell corresponding to 'AgentName'.

Post Extras: Print Post   Remind Me!   Notify Moderator  
be_priti
Junior Member


Reged: 02/25/05
Posts: 4
Loc: Pune
Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist
      #215873 - 11/25/05 04:52 AM

Iam running this code through QTP 6.5.

Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist
      #215874 - 11/25/05 05:03 AM

This was designed to be run from VBS files.

Mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 51 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 3724

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5