Skip to content

Please How can I edit the parameters in the profile #94

Closed Answered by kaliiiiiiiiii
alimayorru asked this question in Q&A
Discussion options

You must be logged in to vote

@alimayorru
You can use something like:

from selenium_profiles.webdriver import Chrome
from selenium_profiles.profiles import profiles
from selenium_driverless.webdriver import ChromeOptions
from selenium_driverless.types.by import By

profile = profiles.Windows() # or .Android
options = ChromeOptions()

emulation = {"mobile":True,"width": 384, "height": 700, "deviceScaleFactor": 10,
        "screenOrientation": {"type": "portrait-primary", "angle": 0}}
profile["cdp"]["emulation"] = emulation

options.add_argument("--headless=new")
driver = Chrome(profile, options=options, driverless_options=True)

get url
driver.get('[https://nowsecure.nl#relax](https://nowsecure.nl/#relax)') # test fing…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alimayorru
Comment options

Answer selected by kaliiiiiiiiii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants