私はウェブブラウザのiframeにあるボタンをクリックしようとすると、アプリを勝ち取っています。WebBrowserコントロールのiframeのボタンをクリック
HTML:iframeのコードで
<iframe frameborder="0" scrolling="no" id="EditorIFrmae" name="EditorIFrmae" width="100%" height="700" style="z-index: 0; height: 852px;" src="X"></iframe>
:
<div height="" width="100%" style="position: relative; min-height: 50px;" onclick="javascript:funcEditPage('SB_Content_Page','SB_Content_PagePreview','PAGE5.asp');" class="SB_DivContentPreview" id="SB_Content_PagePreview">
</div>
マイコード:
HtmlElementCollection linkit = this.webBrowser1.Document.GetElementsByTagName("div");
foreach (HtmlElement foundit in linkit)
{
if (foundit.GetAttribute("id").Equals("SB_Content_PagePreview"))
{
foundit.InvokeMember("Click");
}
}
どのように私はボタンをクリックすることができていますか?
非常に不明瞭な質問。何が問題なのですか? –
@FarhanAnam - 私はそれが十分にはっきりしていないことを知りました。 私はcurameのページではなく、ifameにあるdivをクリックしようとしています。 – Sagi
あなたが直面している問題は何ですか? –