A website shows a table based options to choose. HTML
is
<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)">
I want to Invoke click of radio of string "setBank(11,0,1)". How do I? all radio name are same but onclick()
parameter is different.
in JavaScript someone does this some code are here but how I do this in c#
I try this but never work:
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;
});