Hi all,
Can we run the same script of a Web application on different browsers using QTP. if yes, then what modification should require in the script???
Hi all,
Can we run the same script of a Web application on different browsers using QTP. if yes, then what modification should require in the script???
yes we can do that.
You can change the record and run setting to run the script in different browsers.
Even you can record also on different browser.
Regards,
Brijesh Jain
---------------------------------------------------------
Connect with me on Skype: jainbrijesh
Google Plus : jainbrijeshji
Hi,
I suppose you could defintely run your scripts on different browsers only incase the Objects used by the application are not browser - dependent.
In sense, incase you use the statusBar, Address Bar or other object pertaining to IE as part of your script flow, migrating scripts would require complete re-work.
Cheers....
Thanks for ur answers.......but i m still confused. i tried lots of changes but nothing happen.
i have changed "C:\Program Files\Internet Explorer\iexplore.exe" path to call different browser......the new browser called but after that nothing happened.
Hi,
Since you state nothing else happened, I would like to understand as to whether you input the statement to invoke the Application URL in the new Browser.
Try this incase you wish to check compatibitlity of different browsers. Create a function or action and call this prior to your Login script. Just remember to add the New Browser Object as part of the Object Repository to be on safer side.
Code.
dim objIE
dim objNSN
dim result
dim TestResult
dim message
result = createobject("InternetExplorer.Application")
if result = "Microsoft Internet Explorer" then
set objIE = createobject("InternetExplorer.Application")
objIE.visible = true
objIE.navigate URL
message = "Successfully loaded"
else
message = "IE does not exist in the system"
msgbox result
end if
The above code would launch Internet Explorer and pass the desired application URL to be opened. Now just replace Internet Explorer with Netscape Navigator in the function and include the same before your Login Action.
Trap the return value of result and incase you get a fail, write a log message using ReportViewer Event and stop execution. Incase browser is successfully loaded, check if you can proceed ahead with further Application related Actions.
Cheers.....
Hi friend,
Plz check the attached image.
you can open this window from qtp, using
QTP>Automation>Record and Run Settings
Regards,
Brijesh Jain
---------------------------------------------------------
Connect with me on Skype: jainbrijesh
Google Plus : jainbrijeshji
Certainly yes, You can run the same script of a web App on different browsers with some limitations.
1) You can run the script prepared for IE browser on Firefox.
2)For running the scripts on other browsers than IE you have prepare the script in IE and run them in other browsers becuase you cannot record script in Fire fox.
3)The script may fail if it has any webpage dialogs becuase in IE the dialog is recognized as Window where as in FIREFOX the webdialog is recognized as Dialog this is the only difference we have with IE and FIREFOX.
4) Your script may fail with IE7 if it is prepared aginst IE6 because of the object identiofication for resolving this remove the Object name property in the object repository.