Open MakEurChoIcE opened 1 year ago
So as I do every time an issue comes up that I personally don't have a clue about, I'll google it. I have two sources I would start with. The first is this Stack Overflow answer. Now specifically choosing out this search result over the other because a personal sense of confidence projected by the author I was also being a bit cautious to the claim that "up to date from every issue ever reported on stack overflow as of: September 2018" (in italics and bold no less :) ) I wanted to see what was newer. So narrowed the google search to the past month and got this second response.
My guess would be the secret sauce - or at least the first I would try to got the right Chrome options. I think the first source says it right when they say,
what I like to call the "Ever Growing List of Useless Arguments" chromedriver requires
That said throwing Windows in as part of the configuration always complicates answers .. or at least to me.
Steps to reproduce the issue
I have a test that opens an PDF file in the web browser. This scenario runs perfectly when I don't use Chrome's headless mode. As soon I pass the argument so it opens in headless mode, the keyword
Switch Window
doesn't work. The keyword stays "running" for 10 minutes until the session timeout.My test scenario is this:
Obs: The URL it is public.
My suite_setup.robot is set this way:
Error messages and additional information
This is the error I get after 10 minutes:
I tried using some kind of debug to see if the new tab is being open but the keywork also stop working after I click to open the PDF file. I tried using
Get Window Titles
,Get Window Handles
andGet Window Identifiers
. This 3 keywords had the same problem, stayed running for 10 minutes then the session timeout.Environment
Browser: Google Chrome | Version=113.0.5672.129 Browser driver: Chromedriver.exe | Version=113 Operating System: Windows 10 22H2 Libraries