10-27-2010, 10:23 AM
Hi,
I have corrected the code and replaced ExitTest with Exit Do.
The below code basically check if the window is displayed or not, if the window is not displayed it will close all the browsers and open the application again.
You may replace this code with you existing code. If you are confused, please send your existing code.
Thanks
Vinod[/quote]
I have corrected the code and replaced ExitTest with Exit Do.
The below code basically check if the window is displayed or not, if the window is not displayed it will close all the browsers and open the application again.
Code:
URL = "www.google.com" ' Enter URL of the Application
' Open the Browser and navigate the URL
SystemUtil.Run "IExplorer",URL
' set the initial falg as 0
Flag = 0
Do
If Not Browser("Oracle Applications 11i").Page("Oracle Applications 11i").exist(30) Then
' If the Window is not displayed close all the browsers
SystemUtil.CloseProcessByName "Iexplore.exe"
' Open the Browser and navigate the URL
SystemUtil.Run "IExplorer",URL
Else
' If the Window is displayed then Exit from the loop
Exit Do
End If
' Increment the Flag
Flag = Flag+1
' the below code will exit the test if the flag = 100..
If Flag = 100 Then
ExitTest
End If
Loop
You may replace this code with you existing code. If you are confused, please send your existing code.
Thanks
Vinod[/quote]