Tengo un Form con un WebBrowser. Necesito insertar valores en ciertos inputs, los cuales busco asi
Código:
Hasta ahi todo perfecto, el problema viene cuando quiero interactuar con un checkbox. Hago lo siguiente (que esta mal), pero no se como hacerlo por eso estoy aca :). Yo se que la clase "HTMLInputCheckBox" es la que maneja los checkbox, por lo tanto.HtmlDocument sHTML = webBrowser.Document;
HtmlElement ObjElement;
ObjElement = sHTML.GetElementById(sValue);
if (ObjElement != null)
{
ObjElement.SetAttribute("value", sTexto);
}
Código:
Lo que necesito es poder buscar por "ID" cualquier checkbox, controlar a ver si esta seleccionado y si no lo esta, hacerle click. Gracias! HtmlInputCheckBox OtroObjElement;
// Esta linea es que tiene el error, porque "HtmlInputCheckBox" no tiene el metodo "GetElementById"
OtroObjElement = sHTML.GetElementById(sValue);
if (OtroObjElement != null)
{
if (!OtroObjElement.checked) OtroObjElement.click;
}


