Untitled

mail@pastecode.io avatar
unknown
plain_text
17 days ago
2.3 kB
3
Indexable
Never
const donator = {
            fullName:user.fullName,
            firstName:user.firstName,
            lastName:user.lastName,
            email:user.mail,
            amount:user.amount, //How much money?
            card:user.card,
            billing:user.billing,
        }

        await delay(5000);

        await page.focus("#dummyForm > p > input");
        await page.keyboard.type(donator.amount+"",{delay:typingDelay});
        await page.$eval(".donatebutton",(c)=>{c.click()});

        await page.waitForSelector("#firstNameOnce");
        //User profiles
        await page.focus("#now-form-input-planAmount");
        await page.keyboard.type(donator.amount+"",{delay:typingDelay});
        await page.focus("#firstNameOnce");
        await page.keyboard.type(donator.firstName,{delay:typingDelay});
        await page.focus("#lastNameOnce");
        await page.keyboard.type(donator.lastName,{delay:typingDelay});
        await page.focus("#donationNow > div:nth-child(3) > div > input");
        await page.keyboard.type(donator.email,{delay:typingDelay});
        await page.focus("#donationNow > div:nth-child(4) > div > input");
        await page.keyboard.type("I would like to make changes!",{delay:typingDelay});
        await page.$eval("#panelSwitchNow",(c)=>{c.click()});

        await page.waitForSelector("#nameOnCard");
        await delay(3000);
        await page.focus(".nameNow");
        await page.keyboard.type(donator.fullName,{delay:typingDelay});
        await delay(5000);

        console.log("Reading iframes");
        await framer.isElementInFrame(page.frames(),"input[data-elements-stable-field-name='cardNumber']",donator.card.number);
        await framer.isElementInFrame(page.frames(),"input[data-elements-stable-field-name='cardExpiry']",donator.card.expiry.month+donator.card.expiry.year);
        await framer.isElementInFrame(page.frames(),"input[data-elements-stable-field-name='cardCvc']",donator.card.cvc);
        await framer.isElementInFrame(page.frames(),"input[data-elements-stable-field-name='postalCode']",donator.billing.zipcode);
        // await framer.isElementInFrame(page.frames(),"select[id='Field-countryInput']",'ID');
        await page.$eval("#panelSwitchNoww",(c)=>{c.click()});
Leave a Comment