Gets the ready state of the Web browser.
This example opens a Web session, waits a few seconds, and closes the session without saving.
To run this sample, create and save a Web session named OpenWebDemo.urlx.
Then open any session and copy this code to a module in the Common project.
Sub createAndCloseWebSession()
'Declare application, terminal, and view object variables:
Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim wControl As Attachmate_Reflection_Objects.WebControl
Dim wDocument As WebDocument
Dim view As Attachmate_Reflection_Objects.view
Dim rcode As ReturnCode
Dim path As String
'Get a handle to the workspace
Set app = GetObject("InfoConnect Workspace")
'Open a session to create a Web control
path = Environ$("USERPROFILE") & "\Documents\Micro Focus\InfoConnect\" & "OpenWebDemo.urlx"
Set wControl = app.CreateControl(path)
'Wait until the Web page is ready and then set it as the Web document
Do Until wControl.ReadyState = WebBrowserReadyState_Complete
app.Wait (1000)
Loop
Set wDocument = wControl.Document
'Set a view to make the session visible
Set view = ThisFrame.CreateView(wControl)
'send additional commands to work with the session
app.Wait (5000)
'Close the session without saving
rcode = wControl.Close(CloseOption_CloseNoSave)
End Sub