vytal-io / vytal-extension

Browser extension to spoof timezone, geolocation, locale and user agent.
https://vytal.io
GNU General Public License v3.0
1.8k stars 95 forks source link

User Agent is not changed in Chromedriver #40

Open iamumairayub opened 10 months ago

iamumairayub commented 10 months ago

So I have an app written in Python Selenium that uses Chromedriver and I wanted to change User Agent.

But it does not work, please see video https://www.awesomescreenshot.com/video/21423933?key=ffc853c6b00786132c3ccf92cc69c048 and I am sure no further explanation is required.

I get error

Uncaught (in promise) Error: Debugger is not attached to the tab with id: 1502110130.

EDIT:

Forgot to mention that when I launched browser, I did set values using my code by going through chrome-extension://ncbknoohfjmcfneopnfkapmkblaenokb/popup.html URL.

driver.get('chrome-extension://ncbknoohfjmcfneopnfkapmkblaenokb/popup.html')
driver.find_elements(by=By.CSS_SELECTOR, value='#app-container button')[1].click()
driver.find_element(by=By.CSS_SELECTOR, value='.css-ad1gwk .css-osq56n div').click()
select = Select(driver.find_element(by=By.CSS_SELECTOR, value='#type'))
select.select_by_visible_text('Microsoft Edge (Chromium) - Windows')