Adding the command line --headless
to my chrome driver resulted with few problems in some of my automation testcases.
Some elements where not interactable until I added the argument --window-size=1920,1080
, but on the other hand, adding this argument resulted with a new problem with testcases that uses JQuery's scrolling function (e.g $('#element').scrollBy(...)
).
To the intractability problem I found a solution here, and to the scrolling problem I found a solution here. But what should I do with --window-size
which solves one and creates an other problem? and why does it affect scrolling at all?
======
Scrolling Error Info:
no error is thrown but scrolling simply does not work.
======
Not interactable Error Info:
TimeoutError: An error occurred while running .click() command on <Element [name=@openFiltersView]>: (Session info: headless chrome=87.0.4280.88), (Driver info: chromedriver=87.0.4280.20 (c99e81631faa0b2a448e658c0dbd8311fb04ddbd-refs/branch-heads/4280@{#355}),platform=Windows NT 10.0.18363 x86_64); element not interactable
{"status":-1,"state":"","value":{"message":"element not interactable","error":[" (Session info: headless chrome=87.0.4280.88)"," (Driver info: chromedriver=87.0.4280.20 (c99e81631faa0b2a448e658c0dbd8311fb04ddbd-refs/branch-heads/4280@{#355}),platform=Windows NT 10.0.18363 x86_64)"]},"errorStatus":11,"error":"element not interactable","httpStatusCode":200}