SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Problem with item selection in WebList

    My AUT is a HTML application.

    I have a weblist which have many items. When i recorded the script, the item selection worked. But when i replay the script, the item selection does not work properly.


    When i select an item in WebList, an event get trigerred which populates the data in other fields in next page. While recording everything worked fine. But while replaying the item is displayed as selected, but the event is not getting trigerred and so data is not populated on next page. I tried clicking in the weblist after selection too, but it did not helped either.

    So can you please help me to find some solution.
    Also is there any way to pass "keystrokes" to weblist or webedit objects. Like if i want to hit "Enter" key in Weblist after selecting an element, how can i do that.

    Thanks

  2. #2
    Junior Member
    Join Date
    Jan 2007
    Location
    Salt Lake City, Utah
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    What is the code that you use to select the webList?
    Words of Wisdom

    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Set the Event recognition settings to high and re-record the script.

  4. #4
    Member
    Join Date
    Jan 2007
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Thanks Tarun,

    But setting Web Event recording to high did not helped.Also it did not recorded any additional step.

    So is there any way to pass keystrokes to WebEdit or WebList objects in QTP. I am not sure whether it will help, but i want to try by hitting 'Enter' key after item selection.

    Thanks

  5. #5
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Post the source code related to the weblist in the html source code

  6. #6
    Member
    Join Date
    Jan 2007
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Hi Tarun,

    the code is


    sProdName ="AnyString"
    set ProdList = Browser("B").Page("P").WebList("ProdName")

    ProdList.Click

    if(ItemExists(ProdList,sProdName)= TRUE then
    msgBox "Item exists in the list"
    ProdList.Select("String")
    Else
    msgBox "Item does not exist in the list"
    End If


    Where ItemExists is a function which return true if the string to be selected is available in drop down or not.

    Regards

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Should not

    ProdList.Select("String")

    this be

    ProdList.Select sProdName

  8. #8
    Member
    Join Date
    Jan 2007
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Oh sorry man.

    Its

    ProdList.Select sProdName

    that was a typo mistake. And even the item is displayed as selected in weblist, but the event that should be triggered on its selection, is not getting trigerred.
    So i am just wondering, what should i do to trigger that event. I am not sure, but i am just hoping that passing "Enter" key might trigger that.

  9. #9
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Did you try using the index?

    ProdList.Select "#1"

    The thing is that when you use select, you need to provide the value and not the text. The product name could be just the text and in background the value might be something else. The below post will guide you for that

    http://www.sqaforums.com/showflat.php?Ca...&PHPSESSID=

  10. #10
    Member
    Join Date
    Jan 2007
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with item selection in WebList

    Thanks a lot Tarun. I will try that.

    Best Regards

 

 
Page 1 of 2 12 LastLast

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 11.54%
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 06:13 AM.

Copyright BetaSoft Inc.