SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    MS IE and GetObject

    I need to test WEB application. The problem is that in IE procedure Browser GoToURL does not work and IBM suggests workaround :
    Dim internetExplorer as Object

    Set internetExplorer = CreateObject("InternetExplorer.Application")
    internetExplorer.VISIBLE = true
    internetExplorer.Navigate "about:blank"

    It works, but the problem is I cannot reset script, i mean if it stops I'm not able to continue from the middle because I cannot retrieve existing instance of Internet Explorer. I've read on the Internet that there are problems with GetObject function, which I also tried in PHP and Perl - function does not work.
    Does anyone know a workaround for this issue?

    Thanks for your attention.

  2. #2
    Advanced Member Ciege's Avatar
    Join Date
    Feb 2002
    Location
    Scottsdale, AZ, USA
    Posts
    594
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: MS IE and GetObject

    This code will search all running applications for a running IE Browser and set an object to it.

    Set objsw = CreateObject("Shell.Application")

    Set objsw = objsw.Windows

    windowCount = objsw.Count

    for z = 0 to windowCount - 1 step 1

    set objBrowser = objsw.item(z)

    title = objBrowser.fullname

    If Instr(title, "IEXPLORE") OR InStr(Title, "iexplore") Then

    ' We have our browser object - and here is proof - it will go to yahoo.
    ' objBrowser.Navigate( "http://www.yahoo.com" )
    ' MSGBOX objBrowser.locationURL

    If IsMissing(varBrowserID) = 0 Then
    If INSTR(1, objBrowser.locationURL, varBrowserID, 1) Then
    Set GetRunningBrowserObject = objBrowser
    Exit For
    End If
    Else
    Set GetRunningBrowserObject = objBrowser
    Exit For
    End If

    End If

    next z

    Set objsw = Nothing
    If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

    Ciege...

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

    Re: MS IE and GetObject

    Ciege, thanks for your reply. We tried the same code in php - it works. But in Robot there's an error dialog on this line

    set objBrowser = objsw.item(z)

    The error says : "Runtime error '440' - Module temp_EdgarsJ, Line 50. object error"

    Robot versions which we tried 7.0 and 7.0.1

  4. #4
    Advanced Member Ciege's Avatar
    Join Date
    Feb 2002
    Location
    Scottsdale, AZ, USA
    Posts
    594
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: MS IE and GetObject

    I'm not sure what the issue is. The code works just fine for me with Robot 7.0.1.

    Can you verify that the var windowcount actually contains a value when set to objsw.Count? That code is not verifying that there is not a non 0 value.

    Also make sure that you DIM objSW as an Object in Robot.

    Dim objSW as Object
    dim windowCount&
    dim z
    dim objBrowser as Object
    dim title$
    Dim strTemp$
    If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

    Ciege...

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

    Re: MS IE and GetObject

    Everything is as you said. Doesn't work :/

 

 

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 04:17 AM.

Copyright BetaSoft Inc.