SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Junior Member
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Calendar Parameterization-PLEASE HELP

    Hi Guys

    I need your help again.

    Based on the application, user should select a date from Java Calendar (appears as a link). Pls see my code below

    Set BaseObject=Browser("Browser").Page("Page")

    BaseObject.Link("Open the calendar popup.").Click

    BaseObject.Link("28").Click '(I selected August 28).

    I need to parameterize the code in such way that it will take the same date no matter which month it is.

    The links are different for each month.

    How to do that?

    Thank you in advance for any given suggestion.

  2. #2
    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: Calendar Parameterization-PLEASE HELP

    You need to use the text of the link

    BaseObject.Link("outertext:=28").Click

  3. #3
    Junior Member
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    Sorry..it does not work...each date as a link is a different object

  4. #4
    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: Calendar Parameterization-PLEASE HELP

    What do you mean by it doesn't work?

    - Doesn't serve your purpose?
    - Doesn't click on the link?
    - Gives an error?

  5. #5
    Junior Member
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    I mean it works when I run the script for now-August month but if I run it in September, October, November...whatever it is, it would not...because it will be searching for a particular link-in our case August 28. As I said previously, each day has its own link.

  6. #6
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    What are the object differences between August 28th and September 28th?

    If you just describe it by the outertext of 28 it should work regardless of the month.

  7. #7
    Junior Member
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    It takes each day as a link object.

  8. #8
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    Right but the properties of the link are just identified by the number right? What's the difference between August 28th and September 28th in object spy?

  9. #9
    Junior Member
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    When I run the code, QTP gives me an error message "The "Link" object's description matches more than one of the objects currently displayed in you application. Add additional properties to the object description in order to uniquely identify the object"

  10. #10
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Calendar Parameterization-PLEASE HELP

    Well use the object spy and see what other properties you can use to uniquely identify. If it's managing to see the whole calendar year, then you may need to use an index 1 for outertext 28 being January, etc.

 

 
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 08:03 AM.

Copyright BetaSoft Inc.