Hello,
I'm want to automate our web testing setup and have a general question for my setup.
I want to test our test cases against different browsers with different browser sizes. As the test will run in Jenkins on a machine without graphical interface I need to use headless browsers for chrome and firefox.
I set an endpoint for chrome using:
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['headless', 'window-size=1920,1080']
}
}
Can i use different configurations when starting the ".exe"? Or do I use a different approach?
Or do I write a custom function and pass the arguments i.e.:
Host.Current.OpenBrowser(pageUrl," 'headless', 'window-size=1920,1080' ",false,true,false,false,false);
(However, the arguments are not used, when starting the browser on an endpoint).
Thanks for your help.
Best Practice Headless Web Driver
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Best Practice Headless Web Driver
Hello Pamana,
Thank you for your post.
You could use the commandline argument "/endpointconfig:<Configuration Name>" for starting your test with a specific endpoint configuration.
As an example, the whole command would look like this:
I hope, this information is helpful.
regards,
Stephan
Thank you for your post.
You could use the commandline argument "/endpointconfig:<Configuration Name>" for starting your test with a specific endpoint configuration.
As an example, the whole command would look like this:
Code: Select all
MyTest.exe /endpoint:MyEndpoint /endpointconfig:MySpecificConfiguration
regards,
Stephan