Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing on different bowsers
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
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.
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
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")
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
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?
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
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.
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
Thanks a lot for your help Manish,

Take care,

Juan Luna
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)