单击Internet Explorer中的Office 365按钮,根据其文本

时间:2017-02-14 20:00:10

标签: office365 autoit

我有一个Office 365按钮,我需要点击它,它看起来像这样

<button class="_ho2_2 _ho2_4 ms-fwt-r ms-fcl-ns ms-bcl-nl o365button" aria-expanded="false" aria-haspopup="true" aria-label="user menu with submenu" type="button" autoid="_ho2_0">
<div tabindex="-1" class="_ho2_5">
    <div class="_pe_12 _pe_e2">
        <span class="_pe_g owaimg presenceJellyBeanBase presenceJellyBeanSmallBase presenceJellyBeanUnknownSmall _pe_i2 _pe_d2"></span>
    </div>
    <span class="_pe_h">
        <div class="ms-Icon--person ms-icon-font-size-50 ms-icon-modifier-doughboy ms-bgc-nt ms-fcl-w-b ms-icon-modifier-personDoughboy ie _pe_b2">
        <div>
            <img class="_pe_e _pe_b2" style="top: 0px; width: 50px; display: inline;" aria-label="Contact photo" src="service.svc/s/GetPersonaPhoto?email=test1%40messageware.com&amp;UA=0&amp;size=HR96x96&amp;sc=1487086023815">
        </div>
        </div>
    </span>
</div>
</button>

文本“带子菜单的用户菜单”是唯一与Html中其他按钮不同的相同字符串。

点击按钮的最佳方法是什么?请参阅屏幕截图:

enter image description here