thirtyfour
thirtyfour copied to clipboard
What is the equivalent of the 'set_capability' function from Selenium?
Hi, I want to set up Browserless v1 with ThirtyFour, but in order to connect to Browserless, I need to set the token. In Selenium, the token is set using the set_capability method on the ChromeOptions object.
I've tried setting the token with add_args and inserting browser options, but this is not the same. How can I achieve this, since the token is required for the self-hosted Docker?
I'm currently getting a '403 unauthorised' error, even when the token does match.
### Selenium Code Example:
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.set_capability('browserless:token', '<token found in logs>')
driver = webdriver.Remote(
command_executor='http://localhost:3000/webdriver',
options=options,
)
Related GitHub issue in Browserless: https://github.com/browserless/browserless/issues/3495#issuecomment-1831724328
hmm looking into this issue I have missed this, will make sure to add this