This is my first time using puppeteer for some light automation. I am running into an issues trying to click a button that is located within an iframe.
Here is my code:
await page.waitForSelector('iframe');
const frameElement = await page.$(
'iframe[src="https://ibx.key.com/ibxolb/login/client/index.html"]',
);
const frame = await frameElement.getFrame();
The getFrame()
errors because the frameElement is return as a JSHandle@node
.
The selectors I have access to for the iframe are src
and title
. As you can see I am using src
.
I have searched and searched for how to do this but none of the examples seem to work for me.
I am stuck so if anyone has any advice, solution, or direction I would appreciate it.
Thank you,
Joe
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…