Completely new to this, I am unable to get my code to click and activate a tabbutton on a webpage, the part of the website I am trying to activate is
class="tabButton EngagementsHistoryTable"
"Web History"
<ul class="tabs_manager_buttons_container lpview_tabs_manager_buttons_container">
<li class="lpview_underLine underLine" style="left: 0px; width: 132px;
display: block;"></li>
<li class="tabButton VisitorListTable first active">
<span class="lpview_tabButton tabButtonText" title="Web Visitors"
tooltip-align="left" tooltip-delay="1500" tooltip-text="Web Visitors">Web
Visitors</span></li>
<li class="tabButton EngagementsHistoryTable">
<span class="lpview_tabButton tabButtonText" title="Web History" tooltip-
align="left" tooltip-delay="1500" tooltip-text="Web History">Web
History</span>
</li>
<li class="tabButton AgentListTable"><span class="lpview_tabButton
tabButtonText" title="Agents" tooltip-align="left" tooltip-delay="1500"
tooltip-text="Agents">Agents</span></li>
</ul>
The below code executes the click but nothing happens.
For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("li")
If element.GetAttribute("className") = "tabButton EngagementsHistoryTable" Then
element.InvokeMember("click")
End If
Next
Aucun commentaire:
Enregistrer un commentaire