As mentioned in the title the browser does not start in headless mode despite overriding the headless user class variable. After inspecting the Selenium Server logs I noticed that the --headless option is not passed down. The issue can be fixed if the --headless option is added as an argument to the options instead of assigning it as a property.
I have kind of given up on the webdriver stuff (instead using playwright, if any browser tests at all..), but if you make a PR I will be happy to merge it :)
As mentioned in the title the browser does not start in headless mode despite overriding the
headless
user class variable. After inspecting the Selenium Server logs I noticed that the--headless
option is not passed down. The issue can be fixed if the--headless
option is added as an argument to the options instead of assigning it as a property.Here is portion of the logs:
Environment
OS
Ubuntu 22.04.3 LTS x86_64
Python
3.11.7
Selenium Server
selenium-server-4.16.1.jar
Chrome WebDriver
120.0.6099.109
Packages
locust==2.20.1
locust-plugins==4.3.2
selenium==4.16.0
Code
Here is my locustfile.py
Fix
I fixed this issue by modifying the
locust_plugins/users/webdriver.py
file.From:
To: