I'm trying to get Tampermonkey to complete an online form. It works every 1 out of 4 times, all I want it to do is a simple check out process on a bigcartel store. Can anyone help?
It should work on any shop using their platform as they are all quite generic, i.e http://groundup.bigcartel.com
my code;
// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @include https://checkout.bigcartel.com/* // @include https://*.bigcartel.com/product // @include https://*.bigcartel.com/cart // @grant none // ==/UserScript== // on "/cart" page click checkout button document.getElementByName("checkout").click(); // fill first three form fields document.getElementById("buyer_first_name").value = "John"; document.getElementById("buyer_last_name").value = "Smith"; document.getElementById("buyer_email").value = "[email protected]"; // click "next" button document.getElementByType("submit").click();