X
Нажмите здесь, чтобы перейти на мобильную версию сайта.

Форум поддержки

headless screenshot with delay

Размещено

I'm trying to write a script that would have firefox take a screenshot from the command line, in headless mode (I think). Only issue is that the site I'm trying to screenshot takes a couple of seconds to finish loading, so I only get a partially loaded screenshot. The only option available on the command line is --window-size...

I can take a screenshot inside the dev console with many more options, including --delay (https://developer.mozilla.org/en-US/docs/Tools/Taking_screenshots), is there any way to replicate these options on the command line?

Any other suggestions to script taking a screenshot of a site with delay added?

I'm trying to write a script that would have firefox take a screenshot from the command line, in headless mode (I think). Only issue is that the site I'm trying to screenshot takes a couple of seconds to finish loading, so I only get a partially loaded screenshot. The only option available on the command line is --window-size... I can take a screenshot inside the dev console with many more options, including --delay (https://developer.mozilla.org/en-US/docs/Tools/Taking_screenshots), is there any way to replicate these options on the command line? Any other suggestions to script taking a screenshot of a site with delay added?

Изменено seedsca

Цитата

Дополнительные сведения о системе

Приложение

  • User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Дополнительная информация

cor-el
  • Top 10 Contributor
  • Moderator
17874 решений 161723 ответов
Размещено

Did you look at Firefox in headless mode?

Did you look at Firefox in headless mode? *https://developer.mozilla.org/en/Mozilla/Firefox/Headless_mode
Помогла ли вам это? 0
Цитата
Размещено

Задавший вопрос

That's what I meant by "on the command line". Headless would have been a much better way to refer to it :)

In headless mode, there is only the option of setting the viewport size, but nothing else related to screenshots. I'd like to set a delay, just as it's possible inside the dev tools console.

That's what I meant by "on the command line". Headless would have been a much better way to refer to it :) In headless mode, there is only the option of setting the viewport size, but nothing else related to screenshots. I'd like to set a delay, just as it's possible inside the dev tools console.
Помогла ли вам это?
Цитата
Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.