Micro Focus QTP (UFT) Forums

Full Version: Runtime opening Mozilla Browser
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Would like to open Mozilla Browser at runtime and navigate to URL Like am doing for IE browser below:-
Code:
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
Window("hwnd:=" & IE.HWND).Maximize
IE.Stop
wait (5)
IE.NAVIGATE "www.abc.com"

Appreciate any help on this. THanks.
Code:
SystemUtil.CloseProcessByName("Firefox.exe")
        SystemUtil.CloseProcessByName("iexplore.exe")

        If envBrowserType = "FF" Then    
                SystemUtil.Run "Firefox.exe", sURL
        Else
                SystemUtil.Run "iexplore.exe", sURL
        End if
I could not understand why u have opened IE by creating object of it. It can simply be opened by "SystemUtil.Run" method...

However you can try the following to open Firefox at run time..

SystemUtil.Run "C:\Program Files\Mozilla Firefox\firefox.exe", "www.google.com"

And make sure nothing is opening in Record And Run settings when u press Run/Record button.