I need to automate click of the OK button (OR press enter key) in the acrobat reader popup which appears in browser after clicking on the button to open pdf file. So it gives you options to open in browser, open in acrobat reader or download. I need to open it in browser and make a screenshot, then switch to parent window (since it opens PDF file in other window).
The problem here is that popup is not part of the web app (not in the DOM), and you can not inspect the element. How do you handle those popups? Please help!
Unfortunately I can not attach screenshot of the popup, since its my first question here
//////////////////////////////////////////////////
//this is the function which clicks on the button before the popup appears
async viewEligibilityPdf() {
console.log('******************* ELIGIBILITY RESULTS PAGE ***********');
await I.waitForText('Eligibility results', 120);
await I.wait(5);
await I.waitForEnabled(this.buttons.viewEligibility, 120);
await I.saveScreenshot(`EligibilityResultsPage.png`);
await I.click(this.buttons.viewEligibility);
}
question from:
https://stackoverflow.com/questions/65893011/how-to-automate-acrobat-reader-popup-in-browser-using-javascript-nodejs-code 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…