'Components filled with Tampermonkey script are not recognized as filled

I filled out the registration form on the site https://register.gotowebinar.com/register/2965111702634965004 automatically with a script.

// ==UserScript==
// @name         Duolos autofill registration form
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       blaz
// @match        https://register.gotowebinar.com/register/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=gotowebinar.com
// @grant        none
// @run-at       document-end
// ==/UserScript==

setTimeout(function(){
console.log("10s later...");

var formFirstName = document.getElementById('registrant.firstName')
var formEmail = document.getElementById('registrant.email')

formFirstName.value = 'My_first_name'
formEmail.value = '[email protected]'

}, 10000);

However, when I want to confirm the form with the button on the page, I get a message that the fields filled in by the script have no content and I have to fill them in to go further. Is there any way around it?

required fields



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source