单击Excel-VBA IE下拉按钮(SPAN NG-IF)(angularjs)

时间:2017-09-17 07:53:47

标签: angularjs vba excel-vba internet-explorer excel

如果是SPAN NG-IF,甚至可以“点击”按钮吗? 或者我看错了。如果我点击下拉菜单上的其他内容,那个名称“Lõuna端口”会发生变化。我有所有名称的列表,但无法弄清楚如何点击它们中的任何一个。 TIA !!!

<button class="dropdown-toggle button ico-marina" aria-expanded="false" aria-haspopup="true" type="button" ng-class="{ 'ico-marina': vm.
UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_MARINA_MANAGER || vm.UserService.getActiveRole().role.authItem === vm.ENUM.RO
LE_MARINA_USER, 'ico-vessel': vm.UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_SAILOR}" uib-dropdown-toggle="">
<!-- ngIf: vm.UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_MARINA_MANAGER || vm.UserService.getActiveRole().role.authIte
m === vm.ENUM.ROLE_MARINA_USER -->
<span class="ng-binding ng-scope" ng-if="vm.UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_MARINA_MANAGER || vm.UserServic
e.getActiveRole().role.authItem === vm.ENUM.ROLE_MARINA_USER">Lõunaranna port</span>
<!-- end ngIf: vm.UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_MARINA_MANAGER || vm.UserService.getActiveRole().role.aut
hItem === vm.ENUM.ROLE_MARINA_USER -->
<!-- ngIf: vm.UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_SAILOR -->
<!-- ngIf: vm.UserService.getActiveRole().role.authItem === vm.ENUM.ROLE_ADMIN -->             
<!-- ngIf: vm.UserService.roles.length > 1 -->
<span class="caret ng-scope" ng-if="vm.UserService.roles.length > 1"></span>
<!-- end ngIf: vm.UserService.roles.length > 1 -->          
</button>

1 个答案:

答案 0 :(得分:0)

这有效

For Each e In oIE.document.getElementsByTagName("a")
    If InStr(e.InnerText, cl) <> 0 Then
        e.Click
        Exit For
    End If
    Next
Next cl