Question

I would like to run my selenium scripts on the cloud/online/remotely. I have been advised google compute engine could allow this.

It would be appreciated if this could be confirmed and additional steps that will be needed to be given too.

Any other solutions suggested would be appreciated.

Was it helpful?

Solution

The only difference is that your GCE instance doesn't have a display, which is going to be an issue for your browser.

To address this, you'll want to run Selenium using a "Virtual Framebuffer". This is basically a "Fake display".

Here's how you set a Virtual Framebuffer up in Ubuntu:

sudo apt-get install xvfb
sudo Xvfb :10 -ac

Then, before starting your selenium script, just run:

export DISPLAY=:10
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top