SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Oct 2001
    Location
    Novato, Ca, USA
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Verification point for dynamically changing Date text.

    I have gone through Questions regarding VP's, but did not find solution for my problem.
    Q:Can some one tell (with Sample scripts) me how to play back scripts with VP for changing date (text) in a web page.

    When we intially recorded (Object data VP) the scripts, the date was yesterdays date(Example: November 18, 2003), but the scripts are failing at the VP when we playback today(Example: November 19, 2003).

    Thanks & Regards in Advance.

  2. #2
    Junior Member
    Join Date
    Oct 2002
    Location
    chennai,Tamilnadu,India
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Verification point for dynamically changing Date text.

    Of course it would fail.I believe that it is a date picker control.There are two solutions
    Assumed that the control always displays the current date.
    1)Add the date to the Datapool and append it to the text field in verification point.
    2)
    Declare a variable.
    Fetch today's date from system defined date functions for current date and append it to the verification point text.
    aravi

  3. #3
    Junior Member
    Join Date
    Sep 2002
    Location
    Altadena, CA, USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Verification point for dynamically changing Date text.

    Here is a small function that I use to find specific text on a page. I call this with the text I am looking for. It will return a sqaPass or sqaFail, which I then pass into a SQALogMessage call.


    Function HTMLFindTextOnPage(txt as string) as integer
    Dim Result
    Dim idx
    Dim Value

    Window SetContext, "WindowTag=WEBBrowser", ""

    Result = sqaFail

    Do
    idx = idx + 1
    Result = SQAGetProperty("Type=HTML;Index=" & idx, "innerText",Value)
    If InStr(1 , Value, txt) Then
    result = sqaPass
    Exit Do
    End If
    Loop While result <> 1003

    HTMLFindTextOnPage = result

    End Function
    Darrel H

    ---------------------------------------------------
    Facilius per partes in cognitionem totius adducimur

  4. #4
    Junior Member
    Join Date
    Feb 2004
    Location
    hyderabad
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Verification point for dynamically changing Date text.

    Second solution you have suggested is useful for us to proceed, but not very sure though how to append the variable in the verification point. Can you kindly send us the syntax

    Thanks in advance
    Sailaja


    Originally posted by aravin:
    Of course it would fail.I believe that it is a date picker control.There are two solutions
    Assumed that the control always displays the current date.
    1)Add the date to the Datapool and append it to the text field in verification point.
    2)
    Declare a variable.
    Fetch today's date from system defined date functions for current date and append it to the verification point text.
    <font size="2" face="Verdana, Arial, Helvetica">

  5. #5
    Junior Member
    Join Date
    Aug 2003
    Location
    India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Verification point for dynamically changing Date text.

    Same problem i was facing .I just use the Date function and assign the recorded date to the system date .and after the excution of the script again re assign the current date to the system date .But still i am in search of a better solution
    Regards
    kkp
    .
    KK PATTANAIK
    Dover Software India
    Bangalore -01
    India
    Tel-91-80-51123421-26(Ext-111)
    Mobile-9886218005

  6. #6
    Member
    Join Date
    Feb 2004
    Location
    Chennai
    Posts
    63
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Verification point for dynamically changing Date text.

    Instead of using an Object Data Verification point and comparing the current result with the baseline data, U can get the current value in the Date control using SQAGetPropertyAsString(...), compare the result with the value getting out of Date function and log y'r custom error/pass message.
    _Raji

 

 

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 8.82%
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 01:56 AM.

Copyright BetaSoft Inc.