Executing Maven: -B -f pom.xml clean test -PsmokeSuite -Dselenide.startMaximized=true
Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865@{#442}) on port $$$$
INFO: Selenide v. 5.3.1
INFO: Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
INFO: BrowserName=chrome Version=77.0.3865.90
System info: host: '', ip: '', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Tried both: specifying browser size to the native (2100x1080) in our case and starting maximised. The resolution appears to be much lower.
Tried the same with Firefox and it works as intended.
Im not using custom driver, Selenide handles it with Selenide.open()
Tried also to specify that programmatically, without maven parameters. Does no effect at all.
@BeforeSuite
public void config() {
Configuration.browser = "chrome";
Configuration.browserSize = "2100x1080";
}
Okay, the problem is with Jenkins run only, it seems. Locally it's resizable. Any suggestions?
Try to setup screen resolution in Xvfb https://wiki.jenkins.io/display/JENKINS/Xvfb+Plugin
@iRaunchy Yes, probably XVFB just creates a small display. Have you tried to configure a bigger display size in XVFB?
Thanks for helping, asked our DevOps for that, will comment here how it was resolved.
@iRaunchy any updates?
Feel free to comment the issue, we will reopen it if needed.
https://stackoverflow.com/questions/39112572/jenkins-not-installing-xvfb-in-windows
are you guys sure its gonna work on Windows machine?
That's what I see in the logs:
System is not Unix, Xvfb will not be started
@iRaunchy Yes, XVFB is only needed for Linux servers.
Then you need to check that your Windows server has a proper display size configured.
Yet again, firefox somehow works with that resolution, but chrome not. I keep the resolution, only change Configuration.browser
Tried to create webdriver with capabilities, without Selenide, works as expected.
options.addArguments("window-size=" + 1980 + "," + 1080);
@iRaunchy Any updates on this issue?
I just tried "your way" (with options.addArguments("window-size=" + 1980 + "," + 1080)) - and it didn't work for me. Chrome has width of my screen (1680), not 1980.
And "selenide way" worked for me (with Configuration.browserSize = "1980x1000"). Chrome has width 1980.