SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2009
    Location
    New York, NY
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Checkpoint creation question

    Hello Everybody,

    I have a question creating checkpoints.

    our page format is like this

    Label: Value

    the label has an id like doc1_label1
    and the value has id like doc1_value1

    like this we have hundreds of labels and associated values. Our developers were generous enough to create ids for all these.
    Now my problem is i am trying to create a checkpoint which ever it could be I want to check whether the value is displaying associated with the label or not.
    I dont know how to do this except for table checkpoints. but if we are using table checkpoints, we do not have ids for tables so we have to use either standard checkpoints or text checkpoints. but text checkpoints doesn't use the ids and in future we will have issues identifying them. but using standard checkpoint, I am not able to associate the label and value.

    I would really appreciate if someone could help me how to acomplish this..

    Thank you all very much for your help...
    Thanks,

    Lisa Gaily

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

    Re: Checkpoint creation question

    Hi Lisa Gaily,

    For your problem no need of check with check point.

    You just check with GetROProperty of each label, and check whether a value is associated with the label.

    Thanks,
    Uday.

  3. #3
    Member
    Join Date
    Jun 2009
    Location
    New York, NY
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Checkpoint creation question

    Hello,

    If (Browser.page.wbedit.getRoProperty("Propertyname") = Expected value) Then

    Write to test results whether the test is passed or failed.

    Is this what you are talking about..

    This looks simple but doesnot check the label and value together.

    And doing this for over 400 values sounds tedious and when we are maintaining the scripts, we will have to do the coding everywhere..

    Please let me know of any other options.

    Thanks,
    Lisa.
    Thanks,

    Lisa Gaily

  4. #4
    Advanced Member
    Join Date
    Aug 2006
    Location
    Other side of the Computer
    Posts
    598
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Checkpoint creation question

    Lisa You need to use descriptive programming:

    here is an example:

    strValue = Browser.page.wbedit("html id:=doc1_label1", "Location:=0").getRoProperty("Propertyname")

    "html id" is the property of the object
    ===========================================

  5. #5
    Advanced Member
    Join Date
    Mar 2007
    Location
    Salt Lake City, UT, USA
    Posts
    606
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Checkpoint creation question

    [ QUOTE ]
    Lisa You need to use descriptive programming:

    here is an example:

    strValue = Browser.page.wbedit("html id:=doc1_label1", "Location:=0").getRoProperty("Propertyname")

    "html id" is the property of the object

    [/ QUOTE ]

    Don't forget you can use regular expressions in your DP. For example, you could do something like this:

    strValue = Browser.page.wbedit("html id:=doc\d{1,3}_label\d{1,3}", "Location:=0").getRoProperty("Propertyname")

    The difference here is it will match any webedit as long as the html ID is the word "doc" followed by 1, 2 or 3 digits, followed by "_label" followed by 1, 2, or 3 more digits.

    Of course, if more than one object on the screen might match this, then we need to get more creative.
    "The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"

  6. #6
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Checkpoint creation question

    Try the following code

    intCnt = 0

    Do While True
    intCnt = intCnt + 1

    strLablel_htmlID = "doc1_label" & intcnt
    strValue_htmlID = "doc1_Valuel" & intcnt

    If Browser.page.wbedit("html Id:=" & strLablel).Exist Then
    strLablel = Browser.page.wbedit("html Id:=" & strLablel).getRoProperty("Propertyname")

    'Add code to validate
    Else
    'Report an exit Do
    Exit Do
    End If


    If Browser.page.wbedit("html Id:=" & strValue_htmlID).Exist Then
    strValue = Browser.page.wbedit("html Id:=" & strValue_htmlID ).getRoProperty("Propertyname")

    'Add code to validate
    Else
    'Report an exit Do
    Exit Do
    End If

    Loop

    Thanks,
    Pavan

 

 

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 9.38%
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 05:08 PM.

Copyright BetaSoft Inc.