SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Feb 2005
    Location
    Pune
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "Retrieve Datatable value operation failed" ,"AgentName" column does not exist

    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 ]

  2. #2
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,398
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist

    Where are you running this AOM code from?

    Mark Smith.

  3. #3
    Junior Member
    Join Date
    Jun 2005
    Location
    Bangalore
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist

    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'.
    san

  4. #4
    Junior Member
    Join Date
    Feb 2005
    Location
    Pune
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist

    Iam running this code through QTP 6.5.

  5. #5
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,398
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: "Retrieve Datatable value operation failed" ,"AgentName" column does not exist

    This was designed to be run from VBS files.

    Mark Smith.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:34 PM.

Copyright BetaSoft Inc.