Setting Element Value with Javascript Not working on a webpa
Posted: Sun Jul 05, 2020 12:55 pm
Hi guys
Im working with Cefsharp to automate a form submission of a web page: https://ahrefs.com/user/login
I'm trying to set the email and password with Javascript, but it auto clears out as if it were not set when I click on submit:
I have tried even doing with an event, but still no success.
What can be the solution?
Im working with Cefsharp to automate a form submission of a web page: https://ahrefs.com/user/login
I'm trying to set the email and password with Javascript, but it auto clears out as if it were not set when I click on submit:
- Code: Select all
email = document.querySelector('input[name=email]');
email.value = "testing@example.com";
I have tried even doing with an event, but still no success.
- Code: Select all
event = new Event('change', { bubbles: true });
email.dispatchEvent(event);
What can be the solution?