SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Problem accessing a new window open from a link

    Hi All,

    I am trying to write a piece a code that will do the following steps on web page.

    1. Get the count of all the links present in the page.
    2. Click on the link using 'shift' key to open the page in a new window.
    3. Access the new window, close the window.
    4. Repeat step 2.


    I am able to open the page in a new window.

    Now the problem is
    Most of the properties of the newly opened page are the same as the Parent page. eg (Browser: title, name) (page: title,name)

    I can see that 'hwnd' property is differnt in both the pages (using object spy.

    Is there a way I can make use of hwnd property to get the child page access?

    Any suggestions/ Comments are highly appreciated.

    Here is my code

    *********************
    If Browser("title:= GLT Room Reservation").Page("title:= GLT Room Reservation").Exist (0) Then


    Set oDesclink = Description.Create()

    oDesclink("micclass").Value = "Link"

    Set oLink = Browser("title:= GLT Room Reservation").Page("title:= GLT Room Reservation").Childobjects(oDesclink)


    For i =1 to oLink.count()-1

    Setting.WebPackage("ReplayType") = 2 'replay type to mouse/keyboard
    hwnd = Browser("title:= GLT Room Reservation").GetROProperty("hwnd")
    Window("hwnd:=" & hwnd).Type micShiftDwn

    oLink(i).click


    Window("hwnd:=" & hwnd).Type micShiftUp
    Setting.WebPackage("ReplayType") = 1 'reset to event (DOM)

    'If Browser("title:= GLT Room Reservation").Page("title:= GLT Room Reservation").Exist (0) Then
    ''Read the data from the Child page
    End If

    Next

    End If
    *********************

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem accessing a new window open from a lin

    try to use the property "creationtime". the second browser has there the value "1", the origin browser "0"
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

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

    Re: Problem accessing a new window open from a lin

    Hi rscholz660,

    Thanks a lot for your suggestion.

    I am now able to access the child objects using "creationTime"

    Problem solved.

 

 

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:26 AM.

Copyright BetaSoft Inc.