How to auto-fill & auto-submit Google Search Console sitemap using Tapermonkey

When using Google Search Console, you might want to submit your sitemap manually from time to time to accelerate indexing of new content on your website.

The following Tapermonkey script will automatically fill in sitemap.xml and click the Send button. Depending on your language setting, you will need to adjust the document.querySelector() calls and modify the script header according to your domain ( in this example):

// ==UserScript==
// @name         SearchConsoleAutoFillSitemap
// @namespace
// @version      0.1
// @description  ?
// @author       You
// @match
// @icon
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    // Simulate input
    let elem = document.querySelector("input[aria-label='Sitemap-URL eingeben']");
    elem.value = "sitemap.xml";
    elem.dispatchEvent(new Event('input', {
        bubbles: true,
        cancelable: true,
    // Click "Send" button
    setTimeout(() => {
        console.log("Clicking Send button");
        document.querySelector("c-wiz[data-node-index='2;0'] div[tabindex='0']").click();
    }, 500);