Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobileEmulation #214

Open
dimitrivisser opened this issue Jun 19, 2021 · 2 comments
Open

mobileEmulation #214

dimitrivisser opened this issue Jun 19, 2021 · 2 comments

Comments

@dimitrivisser
Copy link

dimitrivisser commented Jun 19, 2021

WIth the standard chromedriver I use mobileEmulation. I tried with undetected-chromedriver, but I cannot get it to work.

`import undetected_chromedriver.v2 as uc

mobile_emulation02 = {
"deviceMetrics": { "width": 414, "height": 896, "pixelRatio": 2.0 },
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A356 Safari/604.1"
}

options = uc.ChromeOptions()
options.add_argument('--no-first-run --no-service-autorun --password-store=basic')

options.add_experimental_option("mobileEmulation", mobile_emulation02)

driver = uc.Chrome(options=options)

location = 'https://bloommarketing.agency/'

with driver:
driver.get(location) `

I get the error: "selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: mobileEmulation"

Am I doing something wrong? Or is this just not working with undetected-chromedriver and can I stop trying?

@cf313995
Copy link

same problem

@kaliiiiiiiiii
Copy link

@cf313995 @dimitrivisser
you can use Selenium_Profiles
still in progress//working on btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants