Results 1 to 3 of 3

Thread: Need VB Script to automate the IE !!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    2

    Need VB Script to automate the IE !!!!

    Hi All,

    I am a beginner to Vb Script, So i wanted to know the some useful information for my scenario automation.
    My scenario includes ::
    1. Opening the Internet Explorer
    2. Maximize the window
    3. Wait for Page to load fully
    3. Click on Link
    4. Getting the text from a label/Span
    5. Verification of the text in the browser

    Is is possible to automate the flow by using simple Vb script (.vbs file) without using any automation tool???
    Please help in this regard.
    Thanks in Advance !!

  2. #2
    Addicted Member
    Join Date
    Jul 2009
    Posts
    208

    Re: Need VB Script to automate the IE !!!!

    All that can be done by using the InternetExplorer.Application object and HTML Object Library. Clue.... Google...

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    2

    Re: Need VB Script to automate the IE !!!!

    Is it possible for a VBscript to open a maximized (not fullscreen) Internet Explorer window and bring it to the foreground? I am using the below code to open the IE

    Set IE = CreateObject("InternetExplorer.Application")
    IE.menubar = 1
    IE.toolbar = 0
    IE.statusbar = 0
    IE.Navigate ("My Html form")
    IE.Visible = True

    I have tried using the property .FullScreen, but it is opening the IE window in full screen mode.

    But I want it to be in Maxzimized(Not in full screen mode)

    I found the code below from another posting, but it give me errors when I try to run it from a VBscript.

    'Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

    Global Const SW_MAXIMIZE = 3
    Global Const SW_SHOWMINIMIZED = 2
    Global Const SW_SHOWNORMAL = 1

    apiShowWindow IE.hwnd, SW_MAXIMIZE

    I think the above will work fine for Excel macros, is there any relevant VB script code for the above ??

Posting Permissions

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



Click Here to Expand Forum to Full Width