Please How can I edit the parameters in the profile #94
-
Please how can I edit the parameters in the profile? For example how can I edit the screen size in this code 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()
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 fingerprint
driver.quit() |
Beta Was this translation helpful? Give feedback.
Answered by
kaliiiiiiiiii
Aug 17, 2023
Replies: 1 comment 1 reply
-
@alimayorru 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 fingerprint
driver.quit() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kaliiiiiiiiii
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@alimayorru
You can use something like: