Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Can we automate print window( Ctrl+P) using testcafe with JavaScript

I am automating a web application using TestCafe with JavaScript. In the middle of the flow, I get a print window(Ctrl+P) where we get the preview and save and cancel buttons. I need to click on the cancel button. But my TestCafe controller is not switching to the print window. It is still on the web application page only.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

TestCafe does not allow you to automate the Print dialog because TestCafe does not have access to buttons of the Print dialog.

The Print dialog is part of the browser functionality, not the webpage functionality, so we assume that the Print Dialog should be treated as alert, confirm dialogs, and others (https://testcafe.io/documentation/402684/reference/test-api/testcontroller/setnativedialoghandler).

We have an issue to support the Print Dialog in a way similar to the alert dialog: https://github.com/DevExpress/testcafe/issues/2331

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!