SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    cannot recognise child objects yet it can with DP

    I get a count in the collection of 0 yet it does perform the highlight and click - Can you tell me what i did wrong in my collection statement?
    Thanks
    Joe

    Set obj_WebRadioGroup = Description.Create

    obj_WebRadioGroup ("Class Name").value = "WebElement"
    xapthname = "//DIV[@id=""bpa-structures-single-home""]/DIV[1]/DIV[1]/DIV[1]/LABEL[1]/SPAN[1]"
    obj_WebRadioGroup ("xpath").value= xapthname
    If Browser("micclass:=Browser","creationtime:=0","nam e:=Sydney Water Tap in - Building plan approval application").Page("micclass:=Page").WebElement(ob j_WebRadioGroup).exist(0) Then
    Browser("micclass:=Browser","creationtime:=0","nam e:=Sydney Water Tap in - Building plan approval application").Page("micclass:=Page").WebElement(ob j_WebRadioGroup).highlight
    Browser("micclass:=Browser","creationtime:=0","nam e:=Sydney Water Tap in - Building plan approval application").Page("micclass:=Page").WebElement(ob j_WebRadioGroup).Click
    msgbox "found it"
    End If
    Set oColl = Browser("micclass:=Browser","creationtime:=0").Pag e("micclass:=Page").ChildObjects(obj_WebRadioGroup )
    iCount = oColl.Count

  2. #2
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,619
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    I am curious why the name attribute is not in the oColl Set statement two lines from the bottom.
    Could that be the difference? It cannot find the Browser with out this?
    Will the exist, highlight and click work without it?

    Thanks,

    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  3. #3
    Advanced Member
    Join Date
    May 2007
    Posts
    612
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    I don't think that would have an impact unless he has multiple browsers open to different pages. This should be sufficient to find a single open browser: Browser("creationtime:=0").
    Dennis Belew

  4. #4
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,619
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    I'm wondering if the obj_WebRadioGroup is the lowest level object in the path. Maybe the obj_WebRadioGroup is the entire object. I wouldn't expect it to show the different choices of the object as individual child objects. I'm not sure how childobjects is supposed to work on Radio Groups.

    Thanks,

    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

 

 

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 © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:20 PM.

Copyright BetaSoft Inc.