L
L
leroy-bit2021-08-01 22:19:08
Python
leroy-bit, 2021-08-01 22:19:08

Selenium headless error, how to solve?

When adding the '--headless' attribute, an error occurs: NoSuchElementException: Message: no such element: Unable to locate element:
But without adding it, everything works
. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2021-08-02
@dimonchik2013

try to set the window size, heless is usually almost 640 * 480, of course, adaptive sites get out so that the element is not on the first screen

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question