Hi,
I'm trying to automate the opening and login of several of our monitoring system web pages. It was all going well until I had to do HP System Insight Manager (SIM) where there is no ID tag given for me to tell it to ".click()".
On other pages, I have done this:
Where mtbHealth is the ID for the link I wish to automate. The HTML on the specific page looks like:
Now for HP SIM, the HTML code looks like:
In the <a> element there is no ID tag for me to reference.
I have tried:
But it returns "Object Required" on test.click.
If anyone could suggest a way of getting the hyperlink to open from code, I'd be very grateful.
One other thing, if a page uses windows authentication forms (from a different domain) is there a way I can pass credentials to the login prompt?
Many thanks
W.
I'm trying to automate the opening and login of several of our monitoring system web pages. It was all going well until I had to do HP System Insight Manager (SIM) where there is no ID tag given for me to tell it to ".click()".
On other pages, I have done this:
Code:
Set oIE5LB = CreateObject("InternetExplorer.Application")
oIE5LB.Visible = True
oIE5LB.Navigate "[URL unfurl="true"]https://somedeviceurl/Appliance"[/URL]
oIE5LB.Width = 840
oIE5LB.Height = 1028
oIE5LB.Top = 0
oIE5LB.Left = 840
oIE5LB.AddressBar = False
oIE5LB.ToolBar = False
WaitForLoad(oIE5LB)
oIE5LB.Document.all("overridelink").click() 'As there is a certificate error
oIE5LB.Document.forms("mswlogin").all("userid").Value="AnROUser"
oIE5LB.Document.forms("mswlogin").all("pass").Value="myPasswordInClearText"
oIE5LB.Document.forms("mswlogin").all("stdButton").click()
oIE5LB.Document.forms("mswLogin").submit()
WaitForLoad(oIE5LB)
oIE5LB.Document.all("mtbHealth").click()
Where mtbHealth is the ID for the link I wish to automate. The HTML on the specific page looks like:
Code:
<a id="mtbHealth" href="/Appliance/SystemsCenter/Health/index.jsp">
Now for HP SIM, the HTML code looks like:
Code:
<tr>
<td align="center" class="header-status-counts">
<span id="firstStatusCritical" name="firstStatusCritical">
<a title="All Systems: Critical Uncleared Events; click for details." class="header-status-counts" href="javascript:createList(5,2,90194313226,"All Systems: Critical Uncleared Events")">
I have tried:
Code:
Set test = oIE5LT.Document.getElementById("firstStatusCritical")
test.click()
If anyone could suggest a way of getting the hyperlink to open from code, I'd be very grateful.
One other thing, if a page uses windows authentication forms (from a different domain) is there a way I can pass credentials to the login prompt?
Many thanks
W.