Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions robotpageobjects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down