Micro Focus QTP (UFT) Forums
Runtime opening Mozilla Browser - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Runtime opening Mozilla Browser (/Thread-Runtime-opening-Mozilla-Browser)



Runtime opening Mozilla Browser - Charanpreet - 05-04-2011

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.


RE: Runtime opening Mozilla Browser - surya_7mar - 05-24-2011

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



RE: Runtime opening Mozilla Browser - souvikghosh_diatm - 05-26-2011

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.