網站顯示一個基於表格的選項供您選擇。 HTML
是WebBrowser控件中的InvokeMember(「click」)
<td width="33%" class="cont"><input type="radio" name="gatewayIDV" onclick="setBank(11,0,1)">
<td width="33%" class="cont"><input type="radio" name="gatewayIDV" onclick="setBank(3,0,1)">
我想要調用字符串的無線電點擊 「setBank(11,0,1)」。我如何?所有電臺名稱相同,但onclick()
參數不同。
這樣做了一些代碼在這裏,但我如何在C#中做到這一點
我試試這個,但從未工作:
if (webBrowser1.DocumentText.IndexOf("setBank(11,0,1)", StringComparison.InvariantCultureIgnoreCase) > 1)
{
webBrowser1.Document.GetElementById("gatewayIDV").InvokeMember("click");
}
的JavaScript:
$("td.cont").each(function(index) {
var $this = $(this);
var gonext = true;
if($this.html().search(searchStr) != -1) {
$(document).BookingEngine("setAutomationRunningStatus",
!tabData.automationRunning);
console.log(index+":"+$this.html()+":");
$this.children("input[name='gatewayIDV']").click();
gonext = false;
}
return gonext;
});
你能給我的目標URL測試結果如何呢? – KF2 2013-04-11 17:20:47
網站登錄要求。我怎麼聯繫你,並提供詳細信息 – Braheen 2013-04-11 17:33:01