掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
vb2010のwebbrowserでframe内のリンクをクリックするのには (ID:103393)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
VB2010でwebbrowserを用いてframe内のリンク先を自動的にクリックしたいのですがどなたかご指導下さい。 テストURLはhttp://technique.eweb-design.com/sample/6_2_frame.htmlを使用して以下のソースを作成しました。frame(1)のlink(1)をクリックするにはどうすればいいのでしょうか。よろしくお願いします。 Public Class Form1 Dim sno As Integer = 0 Private Sub WebBrowser1_DocumentCompleted(sender As System.Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted Dim elem As HtmlElement With WebBrowser1 .ScriptErrorsSuppressed = True sno = sno + 1 : If sno < 4 Then Exit Sub MsgBox("Text:" & .Document.Window.Frames(1).Document.Links(1).InnerText) '.Document.Window.Frames(1).Document.Links(1).click()??? End With End Sub End Class
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.