1

I am trying to build a solution with Selenium, can I use Firebase Functions to initialize and load webpages with Selenium?

I have found some resources that state no; however they don't give any source and they are 4 years old..:

How or where can I check if this is still the case?

Gourav B
  • 630
  • 3
  • 13

2 Answers2

5

You can't currently use Python to run Selenium scripts in Google Cloud Functions. There's a Feature Request in the Public Issue Tracker currently open, that can be found here. For the Node.js runtime for your Cloud Functions, you could use puppeteer which includes headless Chrome. I found this blog post that details a use-case.

Or if you are ready to trade Python for Cloud functions, we have other services like : App Engine Flex and Cloud Run where you can get it working in Python.

I also found this GitHub link which vouches to run selenium on Google Cloud Functions. If you're fine with a JavaScript/TypeScript example instead of Python, I recommend that you try this template. However, I have not tested this.

Priyashree Bhadra
  • 2,257
  • 1
  • 15
0

TLDR: No you can't open any sort of webpage (that is not just an API call) with firebase functions.

You can use Google Cloud Run to have selenium / cypress / spyder run. GCR achieves a similaresq result, that being it is serverless and scalable.