How to add fake Media Devices to Chrome WebDriver in Selenium w/ Python?

Viewed 51

I am trying to test bot detection system in my website. I want to create a bot that can fake it's media devices and send this in his header to manipulate the host. For now I am sending this info as Null. enter image description here

I tried to add media devices using the code below, but got no results from it. Is there any way we can manipulate this info? Also create this mead devices randomly? Something like fake-useragent?

from selenium.webdriver.chrome.options import Options

chrome_options = Options()

chrome.add_argument("--mediaDevices={videoinput: id = aidsoawjdIUJSIUdwajsidjaw =}")

0 Answers
Related