Running chrome in headless mode

94 views
Skip to first unread message

Sam

unread,
Aug 2, 2021, 4:25:46 PM8/2/21
to headle...@chromium.org

Hi

 

I’ve been struggling to find a way to run google chrome in headless mode to work with my test framework.

 

On a mac, I can run

 

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --no-sandbox --disable-gpu --remote-debugging-port=9222 > /dev/null &

 

However I need the terminal session back, in order to continue with the next test.

 

We basically added chrome to our Jenkins build agent so that we could have the ability to run some karate tests in sequential order.

 

I can get chrome headless communicating with my tests but I’m wondering if I may have missed something.. because it communicates with port 9222 the first test but every test after that, uses a new port like 38656 or similar.

 

I’d like to run each of my tests in it’s own instance of chrome and close the session before moving onto the next test, I hope that makes sense.

 

Is there any documentation on the available flags –example that could help me?

 

Thanks

Sam

 

 

 

Reply all
Reply to author
Forward
0 new messages