I am trying to automatically join a meeting on web conferencing software clearslide using nodejs and puppeteer, when i set values of input and try to submit the values disappear and form raises no input value validation error. Looking at the javascript code shows some code monitoring keypresses and evaluating the key. I even tried dispatching keypress events with char codes but that does not work. Need some suggestions how to set values of input correctly. For eg. I tried
await page.evaluate ( (zoomMeetingName, zoomMeetingEmailId) => {
el = document.getElementById('email');
etype = 'click';
if (el.fireEvent) {
el.fireEvent('on' + etype);
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
}
document.getElementById('email').value = zoomMeetingEmailId;
$("#name").change();
}, MeetingName, MeetingEmailId);
This fires an click event then sets the value of input for email. The value get set but as soon as i submit or click on any of the inputs are fields get empty. I also try to trigger key press event like this:
var press = jQuery.Event("keypress");
press.which = 70;
press.ctrlKey= false,
press.bubbles= true,
press.altKey= false;
$("body").trigger(press);
$("#email").trigger(press);