Allow camera permissions with undetected driver #1566
Answered
by
mdmintz
KolyStudio
asked this question in
Q&A
-
Hello,I'm sorry to bring this up again, but I still haven't found a solution. On selenium, I can do it this way because I call undetecter driver and I can use it with "driver ="
But on seleniumbase, I have no idea how I can call the driver with the use of SB()
If you can help me, again, thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
mdmintz
Oct 25, 2022
Replies: 1 comment 1 reply
-
You can access the SeleniumBase driver with With your code, it would be: from seleniumbase import SB
with SB(uc=True) as self:
self.driver.execute_cdp_cmd(
"Browser.grantPermissions",
{
"origin": 'https://web.snapchat.com',
"permissions": ["geolocation", "audioCapture", "displayCapture", "videoCapture",
"videoCapturePanTiltZoom"]
},
)
self.open("https://web.snapchat.com")
self.type('input[name="username"]', username)
self.type('input[name="password"]', password) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mdmintz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can access the SeleniumBase driver with
sb.driver
orself.driver
(depending on whether you're usingsb
orself
as the access point.With your code, it would be: