SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Jan 2007
    Posts
    218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    selecting date from a calendar.....

    Hi,

    I have a field in which I have to select date from calendar. I recorded the step but it just opens calendar it doesn't select date. In OR calendar is learned as an image. How can I select date ?

    Thanks in advannce.

  2. #2
    Member
    Join Date
    Aug 2008
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: selecting date from a calendar.....

    Have you tried different ReplayType settings? Search the QTP help for more info.

    I've had a similar issue and set Setting.WebPackage("ReplayType") = 2 right before selecting a date and it worked. Then I set it back to 1 to match the default setting.

    This trick also works if you're having difficulty right clicking on items and many other click issues.

    Or if there is a field to type in, you can type in the date too.

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

    Re: selecting date from a calendar.....

    Thanks. I tried relay option but it did not work. Following is the recorded code generated basically it acknowledges as an image

    Browser("Report Builder").Page("Nortel Performance Tool").Image("calendar2_2").Click

  4. #4
    Member
    Join Date
    Aug 2008
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: selecting date from a calendar.....

    So it thinks the entire calander, including the numbers is one big image?

    If so, what about something like:
    Browser("Report Builder").Page("Nortel Performance Tool").Image("calendar2_2").Click x, y, micLeftBtn

    You still might have to play w/ the Replay setting for this to work.

    x and y are coordinates relative to the object's upper left corner.

    This wouldn't be an ideal solution if the date needs to be dynamically set. If the numbers are aligned predictably then you could do a few calculations to figure out where to click.

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

    Re: selecting date from a calendar.....

    Thanks Asahi777

    I tried the statement you gave but it did nothing. Not even opened a calendar that is with replay type 2. With replay type 1 it doesn't recognize the command.

  6. #6
    Member
    Join Date
    Aug 2008
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: selecting date from a calendar.....

    That's weird...replay type 1 is the default and it should work. What is the exact error? Or did it run the command and nothing happened? Maybe the coordinate values need to be adjusted? By the way, the coordinates are in pixel units. so you'll have to guess and check where you want to click in the image, unless you have some kind of pixel measuring tool.

    Even HP's help file gives an example like:

    Browser("Mercury Tours").Page("Mercury Tours").Image("Login").Click 25, 100

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

    Re: selecting date from a calendar.....

    I think I know why it doesn't work because calendar has to be invoked by clicking a button. It is not already open.

    Browser("Report Builder").Page("Nortel Performance Tool").Image("calendar2_2").Click actually just opens the calendar. Nothing is recorded for what I do inside the calendar.

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

    Re: selecting date from a calendar.....

    I tried to learn the calendar it shows me as a table.

    Also, date fields are not enterable only way to enter date in that is through calendar.

 

 

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 10:18 AM.

Copyright BetaSoft Inc.