2

In a Jenkins 2.0 pipeline, I'm using code similar to

wrap([$class: 'Xvfb']) {
  // execute selenium tests
}

As expected, this xvfb session uses the default screen resolution (1024x768x8?). I would like to override it.

According to the documentation at https://github.com/jenkinsci/xvfb-plugin, the Xvfb plugin has a Screen member that controls the resolution. What is the syntax for doing so? I've tried

wrap([$class: 'Xvfb'](Screen:'1440x900x24')) {
  // execute selenium tests
}

wrap([$class: 'Xvfb'][Screen:'1440x900x24']) {
  // execute selenium tests
}

and

wrap([$class: 'Xvfb']) {
  Screen = '1440x900x24'
  // execute selenium tests
}
mcating
  • 1,062
  • 11
  • 18

1 Answers1

3

i believe config goes into the same map, so

wrap([$class: 'Xvfb', screen: '1440x900x24']) {
  // execute selenium tests
}

Should work. And you shouldn't need the square brackets either

tim_yates
  • 167,322
  • 27
  • 342
  • 338