Results 1 to 8 of 8

Thread: script for combobox

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Answers
    9

    script for combobox

    Hi

    I am New to Qtp tool.My project is Client Server application developed in Java.How to pick the data from the drop down list box. At the run time it does not capture the data in the record, because the QTP is unable to recognise the Drop down combo box. Is there any code for that (Descriptive programming).Can any one solve my problem plz. Java add ins loaded in the application. I compared all the properties using both the Object Repository and Object Spy. Thanks in advance.
    Thanks,
    Livetek


  2. #2
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    Re: script for combobox

    Hi,

    Can you give me that two lines of script (pertaining to combobox)?

    Thanks,
    Ganesh


  3. #3
    Junior Member
    Join Date
    Mar 2007
    Answers
    9

    Re: script for combobox

    Quote Originally Posted by smganesh View Post
    Hi,

    Can you give me that two lines of script (pertaining to combobox)?

    Thanks,
    Ganesh
    JavaWindow("z! 3PL").JavaList("Air Dim Factors").Click "#0", "Unit", "Cubic Meters/Kilogram"


  4. #4
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    Re: script for combobox

    why don't you try with "Select", like

    JavaWindow("z! 3PL").JavaList("Air Dim Factors").select "#0"

    Regards,
    Ganesh


  5. #5
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    Re: script for combobox

    Hi,
    If it is a Java application y dont u try this kinda scripting i mean descriptively!!
    For example,

    Browser("GapWeb - News - Home").Page("GapWeb - News - Home").WebList("favoritesCommand").Select "Vendor Profile"

    I have done this and it works fine likewise..so jus' try n let me know if it wont work ..
    Identify the Browser ,Page & Weblist name thru object identification process


  6. #6
    Junior Member
    Join Date
    Mar 2007
    Answers
    9
    hi,

    Browser("GapWeb - News - Home").Page("GapWeb - News - Home").WebList("favoritesCommand").Select "Vendor Profile"
    We have tried in this way, but at the run time it scips the particular column without data & without any run time errors, it passes.But this column is mandatory in the table, with out fill that column we cant save that row that is the problem.
    We tried in this way, plz check this and give me suggestions
    JavaWindow("Z!3PL).JavaTable("Air Dim Factors").JavaList("Air Dim Factors").Select "Centimeters³/Kilogram"

    At the time of recording play back, qtp generates the script for that column as

    JavaWindow("z! 3PL").JavaTable("Air Dim Factors_4").SetCellData "#2","Unit","Centimeters³/Kilogram"


    At the runtime (obj is disable)it gives the following runtime error "The test run cannot continue due to an unrecoverable error.

    Cannot identify the object "Search" (of class JavaButton). Verify that this object's properties match an object currently displayed in your application."
    We compared all the properties using Obj Repository and Object Spy & Smart Identification.Plz any one help me how to write the descriptive programming for java object(Create, Delete, Save, Search) and combobox (drop down list).
    I will appreciate if anyone solves my problem

    Last edited by jainbrijesh; 09-18-2007 at 05:30 AM.

  7. #7
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    Re: script for combobox

    Hi Livetek,

    Just try writing this kinda script

    Browser("Title:=GapWeb - News - Home").Page("Title :=GapWeb - News - Home").Weblist("Name:=FavouritesCommand").Select "vendor"

    So just try identifying the object properties of the Browser,Page&Weblist like name ,title ..
    Replace the above script with your script ,U can also use name,text,window id in addition to Title mentioned above
    Hope this helps u, try n lemme know

    Thanks,
    Kamal


  8. #8
    Moderator
    Join Date
    Sep 2006
    Answers
    920

    Re: script for combobox

    Raghav kamal post is useful.

    Even I am using the same and it works.Don't know why it's not working for you.

    Regards,
    Brijesh Jain
    ---------------------------------------------------------
    Connect with me on Skype: jainbrijesh
    Google Plus : jainbrijeshji

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact