Micro Focus QTP (UFT) Forums
Dialog box differs on different browsers version (IE7 and IE9) for same application - 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: Dialog box differs on different browsers version (IE7 and IE9) for same application (/Thread-Dialog-box-differs-on-different-browsers-version-IE7-and-IE9-for-same-application)



Dialog box differs on different browsers version (IE7 and IE9) for same application - visitjaga - 12-07-2012

Dialog box differs on different browsers version (IE7 and IE9) for same application. Please suggest me how to handle this issue. As I need to run the script in different browser version. It’s hard to use separate script for different browser version.

IE7 browser –
Code:
Browser("xxxxx").Dialog("Windows Internet Explorer").WinButton("OK").Click

IE9 browser –
Code:
Browser("XXXXX").Dialog("Message from webpage").WinButton("OK").Click

Thanks!
Jagadeesh
visitjaga@gmail.com


RE: Dialog box differs on different browsers version (IE7 and IE9) for same app - Ankesh - 12-07-2012

hey just use a if condition..

Code:
if Browser("xxxxx").Dialog("Windows Internet Explorer").WinButton("OK").Exist Then
  Browser("xxxxx").Dialog("Windows Internet Explorer").WinButton("OK").Click
Else
Browser("XXXXX").Dialog("Message from webpage").WinButton("OK").Click
End IF

Regards,
Ankesh