SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP drop down menu

    I am very new to QTP. Just trying to figure out something. My application has the drop down list. For each selection in the list the application acts different. I am trying to get one whole script which checks all the scenarios related to the different drop down selection. Can any one help me with this? Do u want me to use if then statement or anything else. Right now the first selection in the drop down is recorded as

    Browser("Commercial Vehicle and").Page("Commercial Vehicle and_2").WinComboBox("ComboBox").Select 0

    Like this I have select 1,2,3,4 etc.

  2. #2
    Member
    Join Date
    Aug 2006
    Location
    Pune
    Posts
    83
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    I think if ur appplication is giving the different pages for each selection then there is no option other than the Conditional loops but if it's showing the same pages then apply the for loop for selection.

    If anything else please let me know and give some extra detail about how selection is different?

    Sharad

  3. #3
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    You could use the Global sheet and have one script which iterates around this.

    e.g.

    1st column in Global would contain the value which should be selected.
    Then, subsequent columns would contain expected results various things when that option is choosen;

    e.g.
    column name = textbox_a values = true/false
    column name = textbox_b values = true/false
    column name = apply_now_button values = true/false
    column name = name_of_window values = any string
    column name = no_of_links values = any interger
    etc.

    Then within your script you could ensure that these expected results are met.




    cl

  4. #4
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    Thank you Robbie winston and Rob_Burdon. I guess global sheet is kind of working. I just entered two selections and the script is running with no error. Will try for all possible selection and will let you know if I have any issue.

    Rob Burdon - I am no good in programming. And so not confident with For loop. If you can guve m ethe format I will try those for my other uses. Just give me an example.

  5. #5
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    robbiewinston I tried using global sheet.Sample of my script before trying globalsheet is
    Browser("Commercial Vehicle and").Page("Commercial Vehicle and_2").WinComboBox("ComboBox").Select 0

    Since it is taking as select 0 I created a datatable with datavalues 0,1,2,3 bcz my drop down has three selection. Am i supposed to create data table like this ? When i run the scrip after creating global sheet i get the following error.

    "Cannot identify the specified item of the ComboBox object. Confirm that the specified item is included in the object's item collection".

  6. #6
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    Browser("Commercial Vehicle and").Page("Commercial Vehicle and_2").WinComboBox("ComboBox").Select "#0"

    Mark Smith.

  7. #7
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    I did tried it with "#0". But it gives the same error. Can any one help me.

  8. #8
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP drop down menu

    And one more thing is my combo box selection has text in it. When i record QTP records the first selection as selct 0 and second selection as select 1 and third selection as select 2.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:14 AM.

Copyright BetaSoft Inc.