https://cypress.io logo
How to select PDF drop down button from print popu...
# i-need-help
f
in my testing application after click on download PDF using cypress , typescript getting below window which is not a browser popup. unable to detect any element using cypress locator as it is not a browser popup. I need to select "save as PDF" by click on PDF drop-down button present in the popup. Unable to perform any action on PDF drop-down button.
e
You won't be able to interact with OS UI with cypress.
f
then is there any way to handle this popup ?
means any other way to handle this popup in between cypress automation test
e
I think the main thing is what are you wanting to test here? Is this getting generated from trying to print a page on the browser?
f
my aim is to download the pdf after downloadPDF.click(). but after this click operation this popup coming up.
e
Yeah if frontend doesn't handle that download differently then there's no way to download the pdf this way using Cypress.
f
but when I am trying to the steps manually on my application getting browser print popup when trying by cypress getting this native popup.
due to this discrepancy in behavior of manual and automation I got doubt. Is this native popup generated by cypress ?
for both test I used Chrome browser
e
It's just printing the current browser page though right? Why test that? As far as why you would get different popups when running manual vs cypress I'm not sure.
2 Views