Rajavar
asked on
How to use Same QTP Scripts for IE 6, IE 7 and Firefox 2.0 / QTP scripts Browser compatibility
I have working QTP 9.2 scripts on Internet Explorer 6.0 for an web application. And I would like to use same scripts to execute on Internet Explorer 7.0 and Mozilla Firefox 2.0. So, in order to do that I created a global action, which is similar to following that one. I am getting objects are not found in the object repository.
So, how can add browser identification objects to object repository?
And what are the steps to take to execute same QTP Scripts for IE 6, IE 7 and Firefox 2.0?
Now I am using QTP 9.5 version. So, my intension is based on browser I would like to set some objects to browser specific . It would be great, if someone could help me in this regard.
----------------------
if(Window("Microsoft Internet Explorer").Exist) then
' for Internet Explorer 6.0
Browser("Default Details").Dialog("Microsof t Internet Explorer").WinButton("OK") .Click
'elseif (Window("Windows Internet Explorer").Exist) then
else
'for Internet Explorer 7.0
Browser("Default Details").Dialog("Windows Internet Explorer").WinButton("OK") .Click
'else
'for Mozilla Firefox related
'Browser("Default Details").Dialog("Mozilla Firefox").WinButton("OK"). Click
------------
So, how can add browser identification objects to object repository?
And what are the steps to take to execute same QTP Scripts for IE 6, IE 7 and Firefox 2.0?
Now I am using QTP 9.5 version. So, my intension is based on browser I would like to set some objects to browser specific . It would be great, if someone could help me in this regard.
----------------------
if(Window("Microsoft Internet Explorer").Exist) then
' for Internet Explorer 6.0
Browser("Default Details").Dialog("Microsof
'elseif (Window("Windows Internet Explorer").Exist) then
else
'for Internet Explorer 7.0
Browser("Default Details").Dialog("Windows Internet Explorer").WinButton("OK")
'else
'for Mozilla Firefox related
'Browser("Default Details").Dialog("Mozilla Firefox").WinButton("OK").
------------
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What objects are not recognized on FF2.0? Is it the Browser object or any of his descendants?
ASKER
I left the Organization, where I needed the solution for this question and hence did not do followup about this problem.
ASKER
I Created Alert_Dialog_Title_Check golabl action to pass Dialog errors on IE 6, IE 7 and Firefox 2.0. And the script is as follows:
If( Browser("Browser Details").Dialog("Microsof
' For Internet Explorer 6.0
Browser("Browser Details").Dialog("Microsof
Browser("Browser Details").Dialog("Microsof
elseif (Browser("Browser Details").Dialog("Windows Internet Explorer").Exist) then
'For Internet Explorer 7.0
Browser("Browser Details").Dialog("Windows Internet Explorer").WinButton("OK")
Browser("Browser Details").Dialog("Windows Internet Explorer").WinButton("OK")
else
'For Firefox 2.0
Browser("Browser Details").Dialog("The page at https://111.111.1.111 says:").Activate
Browser("Browser Details").Dialog("The page at https://111.111.1.111 says:").WinButton("OK").Cl
end if
The above script is working for IE 6 and IE 7 to pass Dialog errors. But it is failed to pass on Firefox 2.0.
And getting object not found errors. Even add the objects also, run time it is not identifying.
So, my question is, please provide a common action script for Alert Dialgog boxes checking on IE 6, IE 7 and Firefox 2.0
Help wpuld be appreciated.