09-29-2011, 02:15 AM
I have two pathways that I am trying to use when searching for a dialog box
This is of course not working. Can I set a variable name to a path as I have indicated above (thus to use in a With statement)?
Code:
If Browser("Preferences").Page("Preferences").WebElement("close_window2").Exist(0) then
BrowserPath = Browser("Preferences").Page("Preferences")
Else
If Browser("name:=Preferences","CreationTime:=1" ).Page("title:=Preferences").WebElement("html id:=btnClose").Exist(0) Then
BrowserPath = Browser("name:=Preferences","CreationTime:=1" ).Page("title:=Preferences")
Else
Msgbox "Browser Path Not Found"
End If
End If
With BrowserPath
……
This is of course not working. Can I set a variable name to a path as I have indicated above (thus to use in a With statement)?