SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get the caption of top browser or window?

    Hi all:

    How do I get the caption of the top Browser or Window? Basically the active Browser or Window.

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    Just found the answer to my question. The solution looks stupid, but if you have a better solution please post it.


  3. #3
    Junior Member
    Join Date
    Nov 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    I am using this:

    [code]
    [-] LIST OF LIST OF STRING llsURLs = {...}
    [ ] {"al.dailyshopper.com", "Alabama"}
    .
    .
    .
    [-] if !MatchStr ("{lls[2]}*", Browser.GetCaption ())
    [ ] Print("{Heading}*** Error: Expecting the word '{lls[2]}' to appear on the caption, instead the caption bar is showing {Browser.GetCaption ()}")

  4. #4
    Member
    Join Date
    Jun 2000
    Location
    Derby, UK
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    Whats wrong with:

    [ ] string sCaption=BrowserChild().GetCaption()
    [ ] print(sCaption)


  5. #5
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    Try,

    window wWindow = Desktop.GetActive ()
    Print (wWindow.GetCaption ())

    John.

    ------------------

    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    Folks:

    GetCaption only works for the browser you are using with SILK, when a child browser is opened SILK sees it as a dialogbox, hence GetCaption won't give you the caption of the child window.

  7. #7
    Member
    Join Date
    Jun 2000
    Location
    Derby, UK
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    God knows said "when a child browser is opened SILK sees it as a dialogbox".

    Mmm, not here it doesn't. I use child windows all the time in my app with no problems.

    What is the problem your trying to solve by getting the child window caption?

  8. #8
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    I am using win2k and IE5.5

    If a child browser is opened by a main browser. Silk sees it as a dialog box.

    ------------------

  9. #9
    Member
    Join Date
    Jan 2001
    Location
    Westborough, mA, USa
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the caption of top browser or window?

    I had a similar problem. When i record the child window, when i point the cursor to the top header- Silk recognizes it has a dialog box and it doesn't show the contents of the child window but when i record the same child
    window by pointing the cursor to the inside window -silk recognizes it has a browserchild and shows all the contents of the child window.

    For Ex :

    Declaration of the child window by pointing the cursor to the header of the child window:

    window Dialogbox db1
    tag "dialogbox tag"

    Declaration of the child window by pointing the cursor to the inside of the child window :
    window Browserchild bc1
    tag "bc tag"
    HtmlText ht1
    tag "ht1"
    ......

    If you change the declarations as follows it will work

    window DialogBox db1
    tag "dialogbox tag"
    HtmlText ht
    tag "[BrowserChild]bc tag/ht1"
    ...

    ...

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 04:17 AM.

Copyright BetaSoft Inc.