diff --git a/README.md b/README.md index d75308e..666bd39 100755 --- a/README.md +++ b/README.md @@ -215,6 +215,7 @@ like `sauce_platform` etc. can be gotten from Sauce's [configuration app](https: - `sauce_browserversion` : The version of the sauce browser. Defaults to the latest available version for the given browser. - `sauce_device_orientation` : Defaults to "portrait". For mobile devices, tells the page object what orientation to run the test in. - `sauce_platform` : A platform Sauce Labs supports. +- 'sauce_screenresolution' : This controls the screen resolution used during the saucelabs test. See https://docs.saucelabs.com/reference/test-configuration/#specifying-the-screen-resolution for the limitations on the screen resolutions per OS. - `sauce_username`: The user name of your Sauce account. Never hard-code this in anything, and never commit the repository. If you need to store it somewhere, store it as an environment variable. - `selenium_implicit_wait` : A global setting that sets the maximum time to wait before raising an ValueError. Default is 10 seconds. For example, for a call to click_element, Selenium will poll the page for the existence of the passed element at an interval of 200 ms until 10 seconds before raising an ElementNotFoundException. - `selenium_speed` : The time in seconds between each Selenium API call issued. This should only be used for debugging to slow down your tests so you can see what the browser is doing. Default is 0 seconds. eg. $ pybot -v selenium_speed:1 mytest.robot diff --git a/robotpageobjects/base.py b/robotpageobjects/base.py index 2f83dbe..7948750 100755 --- a/robotpageobjects/base.py +++ b/robotpageobjects/base.py @@ -551,6 +551,7 @@ def __init__(self, *args, **kwargs): "sauce_platform", "sauce_browserversion", "sauce_device_orientation", + "sauce_screenresolution", ] for sauce_opt in self._sauce_options: setattr( @@ -820,6 +821,8 @@ class MyPageObject(PageObject): caps["version"] = self.sauce_browserversion if self.sauce_device_orientation: caps["device_orientation"] = self.sauce_device_orientation + if self.sauce_screenresolution: + caps["screenResolution"] = self.sauce_screenresolution try: self.open_browser(resolved_url, self.browser, remote_url=remote_url, desired_capabilities=caps)