0

I want to click this button via pupeteer, but I cant manage to get it done.

This is the element :

 <div class="wp-block-rh-contact-form-input is-form-type-submit">
            <input class="input-field input-submit" type="submit" value="Jetzt absenden!">
            
                    </div>

And this is my attempt to click the signup button:

const signup = await page.waitForXPath('//input[@type="submit"]')
await signup[0].click()

The Error I am getting is: "TypeError: Cannot read property 'click' of undefined"

I hope someone can help me bc I have no idea why it comes out undefined bc it seems like i did everything correctly

1 Answers1

0

Can you try with full Xpath?

const el = await page.$x('YOUR FULL XPATH');
await el[0].click();
MC Naveen
  • 440
  • 5
  • 17