VB net click specyfic按钮Webbrowser [英] VB net click specyfic button Webbrowser

查看:58
本文介绍了VB net click specyfic按钮Webbrowser的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好如何使用VisualBasic 2010在webbrowser上单击此按钮?

< div class =dkl bc bc-Ba qy jt bc-da-ja guidedhelpid =sendbuttonrole =buttonstyle = -  moz-user-select:none; aria-disabled =falsetabindex =0>发送< / div> 

解决方案

通常,您使用服务器控件用服务器端语言工作。也就是说,使用

发送





更好的解决方案是使用按钮或锚点之一的控件asp:Button ,asp:LinkBut​​ton,asp:超链接等......


我找到了答案

  Dim 等位基因作为 HtmlElementCollection = WebBrowser1.Document.All 
对于 每个网页元素作为 HtmlElement 等位元
如果 webpageelement.GetAttribute( guidedhelpid)= sendbutton 然后
webpageelement.InvokeMember( 点击
结束 如果
下一页


Hello how to click this button on webbrowser using VisualBasic 2010?

<div class="d-k-l b-c b-c-Ba qy jt b-c-da-ja" guidedhelpid="sendbutton" role="button" style="-moz-user-select: none;" aria-disabled="false" tabindex="0">Send</div>

解决方案

In general, you use server controls to do work in server side language. That is, use

Send



Better solution is to use one of the controls that are buttons or anchors asp:Button, asp:LinkButton, asp:Hyperlink etc...


I found the answer

Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements
    If webpageelement.GetAttribute("guidedhelpid") = "sendbutton" Then
        webpageelement.InvokeMember("click")
    End If
Next


这篇关于VB net click specyfic按钮Webbrowser的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆