Micro Focus QTP (UFT) Forums
Testing on different bowsers - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Testing on different bowsers (/Thread-Testing-on-different-bowsers)



Testing on different bowsers - jjluna - 12-09-2010

Hello.

I have an script that has a function that opens my IE browser, something like:

Code:
Function ....
Set oBrowser = CreateObject("InternetExplorer.Application")
oBrowser.visible = 1
oBrowser.Navigate2 sURL
End Function

I have a question:

1. I need to run the same script in Firefox and other IE version, then: How do I open firefox or the other stand alone IE?

PS: I would like to have a function to open each of them or maybe to have only one to open a browser based on a value (using a CASE condition)

Thanks for your advice.


RE: Testing on different bowsers - manishbhalshankar - 12-09-2010

Hi Jjluna,

You can have only 1 version of Firefox and IE on a perticular machine. So if you want to test your application for different versiona if FF and IE, you will have to run your script on different machines.
This is how you can open IE and FF:
Code:
Set oBrowser = CreateObject("InternetExplorer.Application")
Set oBrowser = CreateObject("FireFox.Application")



RE: Testing on different bowsers - jjluna - 12-14-2010

Thank you Manish,

So if I already have installed stand alone IE versions in the QTP machine, I would be unable to invoke them? Any workaround or suggestion?


RE: Testing on different bowsers - manishbhalshankar - 12-14-2010

Hi Jjluna,

Use:
Code:
SystemUtil.Run("Installation Directory\iexplore.exe")
Where Installation Directory is the path of stand alone IE. By default it is
Code:
"C:\Program Files\Internet Explorer"
If you have different installation directory for different versions of IE, then you can use SystemUtil.Run to open the desired version.


RE: Testing on different bowsers - jjluna - 12-15-2010

Thanks a lot for your help Manish,

Take care,

Juan Luna