Forum Discussion
Dmitry_Nikolaev
Staff
16 years agoHi Sridhar,
The script below works with a Google page. It specifies a search parameter on the page and clicks the 'Google Search' button if it exists:
Sub Test
' Open IE before executing the script
Dim iexplore
Dim page
Dim cell
Dim textbox
Set iexplore = Sys.Process("iexplore")
Call iexplore.ToURL("http://www.google.com/")
Set page = iexplore.Page("http://www.google.com/")
Set cell = page.Form("f").Table(0).Cell(0, 1)
Set textbox = cell.Panel(0).Textbox("q")
Call textbox.SetText("TestComplete")
If cell.WaitSubmitButton("btnG", 3000).Exists Then
cell.SubmitButton("btnG").Click
End If
End Sub