I am getting this error when running my code.
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ''System.MarshalByRefObject.InvokeMember(string, System.Reflection.BindingFlags, System.Reflection.Binder, object[], System.Reflection.ParameterModifier[], System.Globalization.CultureInfo, string[])' is inaccessible due to its protection level'
I see that when clicking the button it is finding the correct button name but it is not clicking it. Below is my full code.
//LOGIN
private void Login_Click(object sender, RoutedEventArgs e)
{
dynamic d = wb.Document;
var el = d.GetElementsByTagName("input");
var button = d.GetElementsByTagName("button");
d.GetElementsByname("login")[0].value = this.NameBox.Text;
d.GetElementsByName("password")[0].value = this.PWBox.Text;
d.GetElementsByname("save")[0].InvokeMember("login");enter code here
}
This is the button code
<buttons>
<button name="save" class="k-btn-dark" type="submit">Login</button>
The Password and Username fields generate correctly but I get the "inaccessible" error on button click.