Working on multiple tabs
I am looking for a Vb script code for dealing with multiple tabbed browsing.
1.How to activate a perticular tab?
2.Look at the following code
Browsers.Item("chrome").Run("https://www.google.co.in/")
Set pg=Sys.Browser.Page("https://www.google.co.in/")
Set myBtn=pg.NativeWebObject.Find("name", "btnK", "INPUT")
'' Checks if the button exists
If myBtn.Exists Then
MsgBox "hi"
myBtn.Click
End If
''the above code successfully seraches for the search button
sys.Browser.BrowserWindow(0).Keys("^t")
Sys.Browser.ToUrl("https://www.google.co.in/")
Set GetSelectedTab=Sys.Browser.Page("https://www.google.co.in/")
Set img1=GetSelectedTab.NativeWebObject.Find("name", "btnK", "INPUT")
MsgBox img1.exist 'same google page but button search failes
'may i know the reason for failure on the second instance?
Thanks,
Hanumantha