SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5

Thread: DP count issue

  1. #1
    Member
    Join Date
    Apr 2004
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    DP count issue


    Using descriptive programming, when I do the count, it does not give the exact number of elements seen on the page. It even counts the hidden element.
    the existence of those elements can be known only "view source" codes. Is there a way to only count the displayed elements.
    It is even worse when do the count of the "WebElement".

    Thanks for your help.

    Function GetAllSpecificControls(Page, MicClass)
    Set Desc = Description.Create()
    Desc("micclass").Value = MicClass
    Set GetAllSpecificControls = Page.ChildObjects(Desc)

    End Function

    Function GetAllLists(Page)
    Set GetAllLists = GetAllSpecificControls(Page, "WebList")
    End Function

    Function GetAllWebElements(Page)
    Set GetAllWebElements = GetAllSpecificControls(Page, "WebElement")
    End Function


    Set oPage = Browser("micclass:=Browser").Page("micclass:=Page" )
    MsgBox "Number of Drop down: " & GetAllLists(oPage).Count
    MsgBox "Number of Drop down: " & GetAllWebElements(oPage).Count

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

    Re: DP count issue

    Sure, add the visible property to your dp object definition.

  3. #3
    Member
    Join Date
    Apr 2004
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP count issue

    Nope, it didn't help. It returned "true" even that object is not displayed on the screen. For some reason, this object is in my shared object repository. When I clicked on "highlight application" icon, it focused on the whole page and did not not highlight the particular object.
    Any suggestions ? Thanks.

  4. #4
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP count issue

    try restricting to objects where teh following is greater than zero;

    width
    height
    x
    y

    One of those should work

  5. #5
    Junior Member
    Join Date
    Apr 2009
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP count issue

    please check with the visible/enable/abs-x or abs_y property
    It works!!

    Else explain the objects more in the sense if you need objects in specific to a frame then use the frame instead

 

 

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 10.00%
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 12:31 AM.

Copyright BetaSoft Inc.