0

I am opening a PDF file in browser and I need to switch the view to Full Screen before proceeding. I have tried I.pressKey('F11') and even I.pressKey(['Control','+']) but nothing seems to work.

Are there any updated fixes for this? Or any other way to achieve this?

Tim Diekmann
  • 7,755
  • 11
  • 41
  • 69

1 Answers1

0

According to the documentation you could use resizeWindow to achieve it.

I.resizeWindow(width, height)

Where width and height are numbers of given pixels, where width can be set to maximize.

I don't know wich driver you are using but if it is Puppeteer you should be aware that:

Unlike other drivers Puppeteer changes the size of a viewport, not the window! Puppeteer does not control the window of a browser so it can't adjust its real size. It also can't maximize a window.

Rogerio Schmitt
  • 1,055
  • 1
  • 15
  • 35