首页 \ 问答 \ 单击WebBrowser控件vb.net中的按钮(Click button in WebBrowser control vb.net)

单击WebBrowser控件vb.net中的按钮(Click button in WebBrowser control vb.net)

我想点击下图中突出显示的按钮。 代码来自网页:

在此处输入图像描述

我不确定,但我相信按钮是在iFrame中。

我努力了:

Dim wrapClick As HtmlElement = Contact.WebBrowser1.Document.GetElementById("Btn_WrapUp")
wrapClick.InvokeMember("Click")

和:

Dim elPoint As New Point(704, 340)
Dim wrapClick As HtmlElement = Contact.WebBrowser1.Document.GetElementFromPoint(elPoint)
wrapClick.InvokeMember("onClick")

和:

Contact.WebBrowser1.Document.GetElementById("Btn_WrapUp").InvokeMember("Click")

在上面的所有内容中,我尝试过'onClick'和'Click'。

WebBrowser1采用不同的形式。

谢谢!


I am trying to click the button highlighted in picture below. The code is from a web page:

enter image description here

I'm not to sure, but I believe the button is within an iFrame.

I have tried:

Dim wrapClick As HtmlElement = Contact.WebBrowser1.Document.GetElementById("Btn_WrapUp")
wrapClick.InvokeMember("Click")

And:

Dim elPoint As New Point(704, 340)
Dim wrapClick As HtmlElement = Contact.WebBrowser1.Document.GetElementFromPoint(elPoint)
wrapClick.InvokeMember("onClick")

And:

Contact.WebBrowser1.Document.GetElementById("Btn_WrapUp").InvokeMember("Click")

In all of the above, I have tried 'onClick' and 'Click'.

WebBrowser1 is on a different form.

Thanks!


原文:https://stackoverflow.com/questions/33526936
更新时间:2023-07-11 06:07

最满意答案

我认为,因为Gmail根据我的经验不支持外部或内联样式表,您只需要使用样式属性,不要使用内联或外部样式,并将所有样式放在样式属性中

例如:<div style ='border-width:0px; border-style:solid;“'>


i think that because Gmail don't support external or inline style sheet from my experience you need to use only the style attribute don't use inline or external styles, and put all your styles in the style attribute

e.g : <div style='border-width: 0px; border-style: solid;"'>

相关问答

更多