Skip to content
Advertisement

Selenium – can not find element in headless mode

When I run my selenium program normally it works, but when I turn on the headless mode it does not find an element. I am using these driver options:

JavaScript

I am working in python. I added those options in between because someone said that it would help, but it does not.

Advertisement

Answer

When I change the device name form Pixel 2 to iPhone X it works.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement