Hi guys, I'm stuck on one bit of this automation, the login is working perfectly, once It logs in there is a button to expand all that is based in JS. I can't seem to work out how to get it to click the button to expand the whole menu, latest code is below:
The source - trying to get the Expand_Button / expand_all button to work but can't seem to get it! I could possibly get a bit more source code if required.
Here is the JS code for it as well
Hope someone can point out what ive been missing, tried so many different ways and googled for hours but just cant work it out
Code:
Option Explicit
Function Checkpage()
Dim IE As Object
Dim lform As Object
Dim Document As Object
Dim item As Object
Set IE = New InternetExplorerMedium
IE.visible = True
IE.Navigate "https://the.site.we.goto.com/login.do"
While IE.Busy
DoEvents
Wend
Set lform = IE.Document.Forms(0)
lform("username").Value = "uesername"
lform("password").Value = "password"
lform.submit
While IE.Busy
DoEvents
Wend
item = IE.getElementsByName("expand_all").item(5).Click
End Function
The source - trying to get the Expand_Button / expand_all button to work but can't seem to get it! I could possibly get a bit more source code if required.
Code:
<div id="purplenew">
<div id="page-wrapper">
<!-- Regular header with navigation -->
<div id="global-header">
<div class="leftlogo">
<img src="./images/purple/logo.png" alt="LOGO" />
</div>
<div id="header">HEADERRR</div>
<div id="userbar">
<div id="userbar-welcome-message">Welcome Blahblah
blah</div>
<div id="userbar-log-out">
<a href="logoutPage.do">Log Out</a>
</div>
</div>
<!--header navigation-->
<!-- <div class="headingPart">
<h2></h2>
</div> -->
<!--End header navigation-->
<div class="clear"></div>
</div>
<input type="button" class="Expand_Button" id="expand_all"
title="Expand All" /> <input type="button" class="Collapse_Button"
id="collapse_all" title="Collapse All" />
<!-- <div id="main-content">-->
Here is the JS code for it as well
Code:
$(function() {
$("#expand_all").click(function() {
$("#left-nav").jstree("open_all", "#left-nav");
});
$("#collapse_all").click(function() {
$("#left-nav").jstree("close_all", "#left-nav");
});
});
Hope someone can point out what ive been missing, tried so many different ways and googled for hours but just cant work it out
