I have figured out how to launch an Attachmate script that will open a browser,login to a web site. After login, the web page has 5 tabs at the top of the page.
Each tab represents a different page on the site.
I cannot figure out how to click or select a tab on the web page or navigate to another page.
I have looked at the html for the page. The main document is Form1. There is a Tab Table. How do you select or click a tab from this table. I need to click or select the
Tab (id="TabControl_imgTab3a")
Does anybody have any ideas?
This is my Attachmate script
Sub Main
Dim UserName as String
Dim Passwrd as String
Dim oIE as object
Dim oElements as object
Dim oElement as object
UserName = "yxmnwkl"
Passwrd = "yxmnwkl"
sURL = " Set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate(sURL)
oIE.visible = True
While oIE.Busy
Doevents
Wend
Set oElements = oIE.Document.Form1("select")
Set oElement = oIE.Document.Form1.txtCUID
oElement.Value = UserName
Set oElement = oIE.Document.Form1.txtPasswd
oElement.Value = Passwrd
oIE.document.all.Item("btnLogon").Click
End Sub
************************************************************************This is the HTML for the page after login
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Ticket Queue</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content=" name="vs_targetSchema">
<META HTTP-EQUIV="Refresh" CONTENT="15;" url="TktQueue.aspx">
<!-- stylesheet link --><LINK href="shared/estyles.css" type="text/css" rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"
bgColor="#ffffff"> <!-- banner + tab table -->
<form name="Form1" method="post" action="TktQueue.aspx"
<!-- -------------tab table ------------------------------------------------------------------------------------------- -->
<table cellSpacing="0" cellPadding="0" width="388" background="" border="0">
<tr>
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 0 Begin-->
<td align="right"><img src="images/tabs/tab_white_left.gif" id="TabControl_imgTab0a" height="22" width="11" /></td>
<td id="TabControl_tdTab0" nowrap="nowrap" align="center" width="100" bgcolor="#FFFFFF"><B>Ticket Queue</B></td>
<td align="left"><img src="images/tabs/tab_white_right.gif" id="TabControl_imgTab0b" height="22" width="11" /></td>
<!-- Tab 0 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 1 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab1a" height="22" width="11" /></td>
<td id="TabControl_tdTab1" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab1" href="TktWorkList.aspx" style="colorarkBlue;font-weight:bold;">Work List</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab1b" height="22" width="11" /></td>
<!-- Tab 1 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 2 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab2a" height="22" width="11" /></td>
<td id="TabControl_tdTab2" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab2" href="TktControl.aspx" style="colorarkBlue;font-weight:bold;">Ticket Control</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab2b" height="22" width="11" /></td>
<!-- Tab 2 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 3 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab3a" height="22" width="11" /></td>
<td id="TabControl_tdTab3" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab3" href="TktSearch.aspx" style="colorarkBlue;font-weight:bold;">Search</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab3b" height="22" width="11" /></td>
<!-- Tab 3 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 4 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab4a" height="22" width="11" /></td>
<td id="TabControl_tdTab4" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab4" href="TktEntry.aspx" style="colorarkBlue;font-weight:bold;">Ticket Entry</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab4b" height="22" width="11" /></td>
<!-- Tab 4 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 5 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab5a" height="22" width="11" /></td>
<td id="TabControl_tdTab5" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab5" href="TktReports.aspx" style="colorarkBlue;font-weight:bold;">Reports</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab5b" height="22" width="11" /></td>
<!-- Tab 5 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
</tr>
</table>
<!-- end tabs --></td>
</tr>
</table>
<!-- end banner + tab table
Each tab represents a different page on the site.
I cannot figure out how to click or select a tab on the web page or navigate to another page.
I have looked at the html for the page. The main document is Form1. There is a Tab Table. How do you select or click a tab from this table. I need to click or select the
Tab (id="TabControl_imgTab3a")
Does anybody have any ideas?
This is my Attachmate script
Sub Main
Dim UserName as String
Dim Passwrd as String
Dim oIE as object
Dim oElements as object
Dim oElement as object
UserName = "yxmnwkl"
Passwrd = "yxmnwkl"
sURL = " Set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate(sURL)
oIE.visible = True
While oIE.Busy
Doevents
Wend
Set oElements = oIE.Document.Form1("select")
Set oElement = oIE.Document.Form1.txtCUID
oElement.Value = UserName
Set oElement = oIE.Document.Form1.txtPasswd
oElement.Value = Passwrd
oIE.document.all.Item("btnLogon").Click
End Sub
************************************************************************This is the HTML for the page after login
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Ticket Queue</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content=" name="vs_targetSchema">
<META HTTP-EQUIV="Refresh" CONTENT="15;" url="TktQueue.aspx">
<!-- stylesheet link --><LINK href="shared/estyles.css" type="text/css" rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"
bgColor="#ffffff"> <!-- banner + tab table -->
<form name="Form1" method="post" action="TktQueue.aspx"
<!-- -------------tab table ------------------------------------------------------------------------------------------- -->
<table cellSpacing="0" cellPadding="0" width="388" background="" border="0">
<tr>
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 0 Begin-->
<td align="right"><img src="images/tabs/tab_white_left.gif" id="TabControl_imgTab0a" height="22" width="11" /></td>
<td id="TabControl_tdTab0" nowrap="nowrap" align="center" width="100" bgcolor="#FFFFFF"><B>Ticket Queue</B></td>
<td align="left"><img src="images/tabs/tab_white_right.gif" id="TabControl_imgTab0b" height="22" width="11" /></td>
<!-- Tab 0 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 1 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab1a" height="22" width="11" /></td>
<td id="TabControl_tdTab1" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab1" href="TktWorkList.aspx" style="colorarkBlue;font-weight:bold;">Work List</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab1b" height="22" width="11" /></td>
<!-- Tab 1 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 2 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab2a" height="22" width="11" /></td>
<td id="TabControl_tdTab2" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab2" href="TktControl.aspx" style="colorarkBlue;font-weight:bold;">Ticket Control</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab2b" height="22" width="11" /></td>
<!-- Tab 2 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 3 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab3a" height="22" width="11" /></td>
<td id="TabControl_tdTab3" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab3" href="TktSearch.aspx" style="colorarkBlue;font-weight:bold;">Search</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab3b" height="22" width="11" /></td>
<!-- Tab 3 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 4 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab4a" height="22" width="11" /></td>
<td id="TabControl_tdTab4" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab4" href="TktEntry.aspx" style="colorarkBlue;font-weight:bold;">Ticket Entry</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab4b" height="22" width="11" /></td>
<!-- Tab 4 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
<!-- Tab 5 Begin-->
<td align="right"><img src="images/tabs/tab_blue_left.gif" id="TabControl_imgTab5a" height="22" width="11" /></td>
<td id="TabControl_tdTab5" nowrap="nowrap" align="center" width="100" background="images/tabs/tab_blue_bg.gif"><a id="TabControl_hlTab5" href="TktReports.aspx" style="colorarkBlue;font-weight:bold;">Reports</a></td>
<td align="left"><img src="images/tabs/tab_blue_right.gif" id="TabControl_imgTab5b" height="22" width="11" /></td>
<!-- Tab 5 End-->
<td><IMG height="22" src="images/spacer.gif" width="2"></td>
</tr>
</table>
<!-- end tabs --></td>
</tr>
</table>
<!-- end banner + tab table