Is the Playwright Firefox Docker image usable with PlaywrightCrawler?

I understand that the template for PlaywrightCrawler uses the Chrome Docker image. Is it possible to modify that Dockerfile to use apify/actor-node-playwright-firefox:16, and if so, are there any other modifications that would need to be made?
3 Replies
stormy-gold
stormy-goldOP3y ago
Please see this run for details of the errors I am getting:
T7zTFW0HXDl8gYdAh
T7zTFW0HXDl8gYdAh
dependent-tan
dependent-tan3y ago
Hi, I have never seen this error, so I am not sure what you are doing wrong but to use firefox with playwright on apify platform you need: 1. change dockerfile line to FROM apify/actor-node-playwright-firefox:16 2. and in the code import { firefox } from 'playwright' and in crawler options
launchContext:
{
//useChrome:true,
launcher:playwright.firefox,
},
launchContext:
{
//useChrome:true,
launcher:playwright.firefox,
},
hope this helps
stormy-gold
stormy-goldOP3y ago
Thank you very much! The missing piece was the launchContext specification, and it worked!

Did you find this page helpful?