SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Web Mousever Menus Take 2 - Solution

    User David Goldstein (David_Goldstein/CCHLIS@cch-lis.com.nospam) posted:

    I have found a solution to this problem. Or better stated a mix of
    solutions. Steve's idea of using DOM worked to triger the onmouseover
    event that pulls up my submenu. Once I had the submenu up I used
    Robot to record a mouse click on the option that I wanted.

    Thanks to all who helped especially Steve Gray and Luke Goodwin.

    - Dave


    On Wed, 24 Apr 2002 10:53:30 -0400, David_Goldstein/CCHLIS@cch-lis.com
    wrote:
    ---

  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User (lgoodwin@russell.com.nospam) posted:

    Will you please post the code? Thanks!

    Luke


    ---

  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User (David_Goldstein/CCHLIS@cch-lis.com.nospam) posted:

    This is the code that brought up the submenu. One I had this done I just
    used Robot to record a mouse click at the location of my menu choice.

    - Dave


    Function ieStartBrowser() as Object

    Dim sMessage as String
    Dim objBrowser as Object

    Set objBrowser = CreateObject("InternetExplorer.Application")

    If objBrowser Is Nothing Then
    Set ieStartBrowser = Nothing
    Exit Function
    End If

    objBrowser.Visible = TRUE

    Set ieStartBrowser = objBrowser

    End Function

    Function ieGetHTMLDocObj(objBrowser as Object) as Object
    Dim sMessage as String
    Dim objHTMLDoc as Object

    If objBrowser Is Nothing Then
    sMessage = "FUNCTION ieGetHTMLDocObject: could not find Browser
    object"
    MsgBox Space(4) & sMessage, (0+48+0), "IE_Util"
    SQAScriptCmdFailure sMessage
    Exit Function
    End If

    Set objHTMLDoc = objBrowser.Document

    If objHTMLDoc Is Nothing Then
    sMessage = "FUNCTION ieGetHTMLDocObject: could not find HTML
    document object"
    MsgBox Space(4) & sMessage, (0+48+0), "IE_Util"
    SQAScriptCmdFailure sMessage
    Exit Function
    End If

    Set ieGetHTMLDocObj = objHTMLDoc

    End Function

    Function ieLoadPage(objBrowser as Object, sWebPage as String) as Integer

    ieLoadPage = sqaFail

    If objBrowser Is Nothing Then
    ieStartBrowser
    End If

    objBrowser.Navigate(sWebPage)
    While objBrowser.ReadyState <> 4 '4 = the constant value for
    READYSTATE_COMPLETE
    Wend

    ieLoadPage = sqaPass

    End Function

    Sub Main
    Dim Result As Integer
    Dim objBrowser as Object
    Dim objHTMLDoc as object
    Dim objATags as object
    Dim iIMGs as integer
    Dim i as integer
    Dim sTemp as String
    Dim objIMGs as Object

    Set objBrowser = ieStartBrowser()

    Result = ieLoadPage(objBrowser, "\\MyNetwork
    Path\MenuTest\MenuTest\frame_files\top_navbar.htm" )

    Set objHTMLDoc = ieGetHTMLDocObj(objBrowser)

    'I now have the document object

    Set objIMGs = objHTMLDoc.getElementsByTagName("IMG")

    iIMGs = objIMGs.length

    For i = 0 to iIMGs - 1 Step 1

    'We have a collection now of all the "IMG" tags on this page, we
    need to walk through the collection until we find the IMG tag we are
    interested in...

    If objIMGs.Item(i).name = "Session" Then

    objIMGs.Item(i).FireEvent("onMouseOver")

    Exit For

    End If


    Next i


    End Sub
    Friday, April 26, 2002 12:28 PM
    To: "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>
    cc:
    From: lgoodwin@russell.com
    Subject: Re: Web Mousever Menus Take 2 - Solution
    Will you please post the code? Thanks!

    Luke

    trake
    top
    menu
    item
    New
    working
    command.
    using

    ---

  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User Phil Jarin (Phil.Jarin@trw.com.nospam) posted:

    Hi David,

    Will this mouseover work on a mouse-click to select an element of a combolistbox?
    Somehow I cannot get the mouseclick to work on Netscape
    4.7 browser. The mouseclick does not select the specific string element of
    the combolistbox, instead it records index within the object.

    Thanks,

    Phil

    David Goldstein wrote:
    ---

  5. #5
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User Steve Gray (sgray@BridgeMedical.com.nospam) posted:

    Oi. Netscape. I have yet to figure out how to get DOM access from
    Netscape. It's possible, in theory, since Netscape has support for the DOM,
    but how to get an instance of the document object as an OLE automation
    object... that has eluded me thus far.


  6. #6
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User (lgoodwin@russell.com.nospam) posted:

    Forgot to mention this before: If you can't find a way to get Robot to
    perform the GUI action, you could work around it by going directly to the
    destination URL that the menu item links to.

    HTH,

    Luke


    ---

  7. #7
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User (David_Goldstein/CCHLIS@cch-lis.com.nospam) posted:

    Correct. But that wouldn't test the link itself. Also, when the link is
    clicked it runs a javascript that does the linking. Jusy going to the page
    wouldn't test that code either.

    - Dave

    Monday, April 29, 2002 12:24 PM
    To: "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>
    cc:
    From: lgoodwin@russell.com
    Subject: Re: Web Mousever Menus Take 2 - Solution
    Forgot to mention this before: If you can't find a way to get Robot to
    perform the GUI action, you could work around it by going directly to the
    destination URL that the menu item links to.

    HTH,

    Luke
    ---

  8. #8
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Web Mousever Menus Take 2 - Solution

    User (lgoodwin@russell.com.nospam) posted:

    Right. I decided all present would figure this out for themselves. The
    tester needs to decide whether the action is part of the test or only a
    vehicle to accomplish the test.


    ---

 

 

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 13.64%
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 02:17 AM.

Copyright BetaSoft Inc.