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 ?