更新时间:2023-12-06 12:33:52
我遇到了和你一样的问题.InvokeMember 看起来正确,所以我只能假设它没有选择正确的 html 元素.尝试使用值显式引用元素.以下代码对我有用,但我已为您改编:
I was having the same problem as you. The InvokeMember looks correct so I can only assume its not picking up the correct html element. Try refering to the element explicitly using the value. The following code worked for me but I have adapted it for you:
For Each webpageelement As HtmlElement In allButtons
If webpageelement.GetAttribute("value").Equals("E712050-15") Then
webpageelement.InvokeMember("click")
Exit For
End If
Next
祝你好运:)