In headless=False (headed mode):
- We click an element (e.g., a file name like
ProjectAttachedFile1.pdf
). - A new page is opened with the embedded PDF viewer.
Switch Page NEW
works correctly, and we can access the PDF and download it.
In headless=True:
- The click triggers no new page creation.
- After running
Switch Page NEW
, we’re still on the same page (verified via${pages}= Get Page Ids
which shows only one). - As a result, the PDF page isn’t accessible, and download fails.