public static void ClickButton object doc string sign HtmlElementSign

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
public static void ClickButton(object doc, string sign, HtmlElementSign sign_type)
{
HTMLInputButtonElement button = null;
switch (sign_type)
{
case HtmlElementSign.id:
button = GetElementByID(doc, sign) as HTMLInputButtonElement;
break;
case HtmlElementSign.name:
button = GetElementByName(doc, sign) as HTMLInputButtonElement;
break;
}
if (button != null)
button.click();
}