How do you specify a path to the browser binary? #324
Unanswered
joshuastegmaier
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Where does puppeteer install it?
…On Mon, Dec 18, 2023, 3:58 PM Josh Stegmaier ***@***.***> wrote:
I've found this issue: #265
<#265>, but the solution
there does not appear to work, as it generates selenium.common.exceptions.InvalidArgumentException:
Message: invalid argument: unrecognized capability: chrome.binary
I'm attempting to use Chrome installed via the @puppeteer/browser npm
package, but I can't find a way to do so with pylenium (except possibly by
modifying my PATH.)
—
Reply to this email directly, view it on GitHub
<#324>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQDCPLPQG426I3YCYEKL33YKDDB3AVCNFSM6AAAAABA2ICCYSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZVHE3TMNZTGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I'm glad you found a workaround! Your setup is definitely complicated, but
I don't know your context -- maybe all of this is required
…On Tue, Dec 19, 2023, 4:55 AM Josh Stegmaier ***@***.***> wrote:
It installs it in a cache directory inside the working directory, at least
by default. Inside that, it's put into a directory based on the version of
Chrome.
I've got working for now by modifying my PATH temporary. I'm using
Pylenium along with Django's testing framework (which uses unittest.
Because puppeteer returns the version and path of the browser it installs,
our testing code (run through Github Actions) those this to use puppeteer's
Chrome (using the shell to parse out the actual path):
npm install
npx gulp build
chromepath=$(npx @puppeteer/browsers install ***@***.***)
chromepath=${chromepath#* }
chromepath=${chromepath%/chrome}
OLDPATH=$PATH
PATH=$PATH:$chromepath
pipenv run ./manage.py collectstatic --no-input
pipenv run coverage run ./manage.py test
PATH=$OLDPATH`
—
Reply to this email directly, view it on GitHub
<#324 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQDCPOU557MJIZPGBU6EBLYKF6BNAVCNFSM6AAAAABA2ICCYSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TQOJWGYZDI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've found this issue: #265, but the solution there does not appear to work, as it generates
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: unrecognized capability: chrome.binary
I'm attempting to use Chrome installed via the @puppeteer/browser npm package, but I can't find a way to do so with pylenium (except possibly by modifying my PATH.)
Beta Was this translation helpful? Give feedback.
All reactions