1

I am using Chrome Java API to start the Chrome browser as I am using it only for one specific url (and hence did not consider docker due to the overhead).

Locally on windows the browser is launched successfully. When executed on CI server (Linux OS), I had to update the default path of the executable to a different path; so I executed with the following customization - Chrome.start(chromeExecutablePath,true);

It now fails with the following error: ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported.

I tried to dig details to find customization possible using Chrome Java API; however could not find much examples unlike as we have for docker.

Can we set the chrome options when using Chrome Java API ? Is there any way out for the error when specifically using the Java API ?

Leo P
  • 33
  • 2
  • apologies..fairly new to the platform..so missed it.. – Leo P Dec 14 '20 at 14:12
  • I'm closing this as duplicate because there is no better answer than the suggestions given in the other thread. talk to some friend who knows about CI / Docker / DevOps if needed, you will get the same answer. you can't just get Chrome to run on a cloud-box that is headless unless you really know what you are doing and that's why we put so much work into that Docker container. I strongly recommend that you change your approach. all the data is in the `Results` object of karate, just write a simple HTML or text file if needed – Peter Thomas Dec 14 '20 at 14:16

0 Answers0