K
K
KiT2019-02-25 13:20:27
Automation
KiT, 2019-02-25 13:20:27

How to configure "viewport" in "headless chrome" with "remote debugging"?

Welcome all.
Such a thing. There is an app, I'm testing it in headless chrome. I pass the following parameters:

  • window-size=1350,717
  • autoplay-policy=no-user-gesture-required
  • disable-infobars'
  • headless

The problem is this. I want to debug autotests using "remote-debugging-port=9222". But this thing just starts a new chrome session with default settings. As a result, on both chrome instances (headless and remote debugging ), the window-size instruction will override, and the tests will fail.
Has anyone encountered such a problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
leorush, 2019-08-19
@leorush

Show the code you're calling Chrome.
Another point - why do you need headless? It is better to use Xvfb, the headless mode is still rather damp.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question