2
votes

I came up with a strange issue happening when I try to launch a page having some WebGL content using a nightwatchJS-based framework:

  1. If i open the page content directly using chrome, WebGL is detected properly. chrome://gpu/ --> Graphics Feature Status indicates that most of features are harware accelerated

  2. If i open the page using nightwatch, WebGL is not detected (and chrome://gpu/ --> Graphics Feature Status indicates that most of features are software only)

  3. If i open chrome manually, then launch the nightwatch process, WebGL is not detected in the new chrome session (and chrome://gpu/ --> Graphics Feature Status indicates that most of features are software only)

  4. If i open chrome manually, then launch nightwatch process using the same session profile, the page is NOT loaded, but chrome://gpu/ --> Graphics Feature Status indicates that most of features are hardware accelerated

Important detail: it was working fine until end of august, before chrome was updated. Then I tried to update my version of chromedriver, but it did not work either. Chrome does not allow to downgrade to a particular version and is automatically installing updates.

Has anyone ever made a webgl page work with nightwatch ? If so, can you point me to the right thing to do to force WebGL and hardware acceleration to be enabled and load the page through nightwatch interface on a default/custom session ?

1
hi did you find a solution to your problem? I have google chrome installed on a linux box and running nightwatch tests using the linux chrome driver, but i'm not able to use my website because of lack of web gl support. - Chris Hansen
yes, see my own solution below, hope this helps - dgmz

1 Answers

4
votes

Using these options makes it work!

"chromeOptions": { "args": ["user-data-dir=C:\\Users\\user_name\\AppData\\Local\\Google\\Chrome\\User Data", "--ignore-gpu-blacklist", "--use-gl", "--no-sandbox", "--disable-web-security"] },

(replace user_name with the proper value)