要素の子の子のInnerHtmlを取得しようとしています。これが私が持っているものです:
If doc.GetElementById("ctl00_cphBanner_MenuRedesign_BannerAlertsAndOptionsLoginView_BannerAlertsAndOptions_Authenticated_FriendsBubble") IsNot Nothing Then
Dim el As HtmlElement = doc.GetElementById("ctl00_cphBanner_MenuRedesign_BannerAlertsAndOptionsLoginView_BannerAlertsAndOptions_Authenticated_FriendsBubble")
inboxTxt.Text = el.Children(1).Children(0).InnerHtml.ToString
End If
そして、これは私が受け取っているエラーです:
"Object reference not set to an instance of an object."
これを修正するにはどうすればよいですか?
編集:「試行」機能を削除すると、エラーがここに表示されました:
If doc.GetElementById("ctl00_cphBanner_MenuRedesign_BannerAlertsAndOptionsLoginView_BannerAlertsAndOptions_Authenticated_FriendsBubble") IsNot Nothing Then