How to set the screen resolution in Jenkins? I have my selenium project using maven want to run on Jenkins
Jenkins setup:
- Jenkins: 2.479.1
- OS: Windows 11 – 10.0
- Java: 17.0.9 – Oracle Corporation (Java HotSpot™ 64-Bit Server VM)
Trail 1 :
I have given access to the jenkins server to interact with windowns
options.addArguments("enable-automation");
options.addArguments("--window-size=1920,1080");
options.addArguments("--no-sandbox");
options.addArguments("--disable-gpu");
Trail 2 : I have placed above code on my code
I tried both ways to solve my issue but both of them are not working
It was taking default resolution every time
i.e 1024×768 but i want to set this to 1920×1080
Here is the log for referance
WARNING: Unable to find CDP implementation matching 131
Dec 02, 2024 11:46:33 PM org.openqa.selenium.chromium.ChromiumDriver lambda$new$5
WARNING: Unable to find version of CDP to use for 131.0.6778.86. You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.12.1` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
Screen Resolution is -----------------------: 1024x768
Mahesh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2