1

I have been using Selenium for several years and am reasonably proficient. I have recently run into various bot/scraper detectors that have shut me out. It appears that seleniumbase has what it takes to avoid detection. However, i am unable to get the window (using chrome) to open and fill the entire screen - open maximized. In selenium this is relatively simple, but i have been unsuccessful in seleniumbase. I am running python and need to find the command(s) that will open the window in a maximized state. The documentation is quiet on this point and the code samples also do not seem to provide a model. I have used the settings file to get close, but it does not align itself properly in the corners. I know there is a way to do better.

Thanks in advance.

1 Answer 1

5

Window maximization is achieved in SeleniumBase after the browser is launched.

Use driver.maximize_window() with the SeleniumBase Driver() format. Example:

from seleniumbase import Driver

driver = Driver(uc=True)
try:
    driver.maximize_window()
    driver.open("https://seleniumbase.io/demo_page")
    driver.sleep(2)
finally:
    driver.quit()
Sign up to request clarification or add additional context in comments.

2 Comments

Worked first time. Thank you so much Michael. Been trying to track you down for a few other questions but i seem to be muddling through. Seleniumbase seems wonderful so far.
Awesome! Be sure to mark answers as Accepted if they answer your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.