I have been able to reproduce this issue with the site [W3School.com][1]
and this code. This sample script was recording using QTP 11 and Internet Explorer browser.
Browser(''zz'').Page(''P'').Sync
Browser(''zz'').Navigate ''http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert''
Browser(''zz'').Page(''Tryit Editor v1.5'').Frame(''view'').WebButton(''Show alert box'').Click
Browser(''zz'').Dialog(''Message from webpage'').WinButton(''OK'').Click
Here are some facts about different browsers and how they handle dialog boxes.
* Internet Explorer (IE9) uses Microsoft windows dialog boxes with windows buttons.
* Firefox (3.6) uses Microsoft windows dialog boxes with child web page with web buttons.
* Google Chrome uses a custom window control (Chrome_Widget)
HP does not state that the dialog boxes should or should not work the same across browsers. Since each browser has a different implemented of the dialog boxes I think it would be difficult HP to translate each for coding. Recommend writing function code to deal with each unique browser dialog box environment. Below is an example code I used for the above code
Browser(''zz'').Page(''P'').Sync
Browser(''zz'').Navigate ''http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert''
Browser(''zz'').Page(''Tryit Editor v1.5'').Frame(''view'').WebButton(''Show alert box'').Click
tempVar =Browser(''zz'').GetROProperty(''application version'')
Select Case tempVar
Case ''Chrome 15.0''
msgbox ''Chrome''
Window(''Google Chrome'').Window(''The page at www.w3schools.com'').ClickOnText ''OK''
Case ''Mozilla Firefox 3.6.17''
msgbox ''Firefox''
Browser(''zz'').Dialog(''The page at http://www.w3schoo'').Page(''The page at http://www.w3schoo'').WebButton(''OK'').Click
Case ''internet explorer 9''
msgbox ''internet explorer 9''
Browser(''zz'').Dialog(''Message from webpage'').WinButton(''OK'').Click
Case else
Msgbox ''nothing'' &tempVar
End Select
*Note: Above code is only for an example and tempVar will have be be changed to only get correct browser*
[1]: http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert9595-