setting resolution #852
-
Hi!, I am a C++ backend developer, very newbie to Python, so please do not assume I know what I am doing. I need to test a web interface and found SeleniumBase could simplify that task a lot since it is creating nice reports, and doing by default a lot of stuff that I would need to do if using Selenium directly. I am trying to set the resolution for the browser (Chrome), I am running Windows (to match the users of this web interface). Most probably I am doing something wrong. I created a custom_settings.py file containing: and then in the command line to launch the tests I write: also tried with --settings=custom_settings.py and did not work for me. I am getting screenshots during the test using self.save_screenshot("Connected.png"), but the screenshot file has not the resolution I want (not even close). What am I doing wrong? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @ZoiyoTravez , is this issue only happening in headless mode for you? |
Beta Was this translation helpful? Give feedback.
Hi @ZoiyoTravez , is this issue only happening in headless mode for you?
self.save_screenshot()
callsdriver.get_screenshot_as_file()
, and it may be that screenshots in headless mode always get the full-page screenshot, regardless of the window size during the test run. Hard to know for sure, because I can't see the browser window in headless mode because there's no visible screen.