I'm trying to make a script and run it using Tampermonkey. Website belongs to a Visa Application Center in Morocco (https://morocco.blsspainvisa.com/book_appointment.php).
Once I open the webpage, I get a popup. Code is made to close it. Then when I choose the city: Tangier, I get another popup. Then I select the category: Normal, phone number and email address.
document.querySelector("#IDBodyPanelapp > div.popup-appCloseIcon").click();
document.getElementById('centre').value="8#3";
document.querySelector("#IDBodyPanelapp > div.popupDivCenter").click();
document.getElementById('category').value="Normal";
document.getElementById('phone').value="60000000";
document.getElementById('email').value="email@gmail.com";
I need to automate this process with prefilled values. I've done that but the only problem is that when I use the above code, the Category dropdown menu remains empty. It seems that the values don't get loaded in order to select one.