-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actionchain speedup #55
Actionchain speedup #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it, very nice!
@@ -0,0 +1,55 @@ | |||
======== | |||
Settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to also link to ScreenPy's settings here?
class ScreenPySeleniumSettings(ScreenPySettings): | ||
"""Settings for the ScreenPySelenium. | ||
|
||
To change these settings using environment variables, use the prefix | ||
``SCREENPY_SELENIUM_``, like so:: | ||
|
||
SCREENPY_SELENIUM_CHAIN_DURATION=50 # sets the actionchain duration to 50ms | ||
""" | ||
|
||
_tool_path = "screenpy.selenium" | ||
model_config = SettingsConfigDict(env_prefix="SCREENPY_SELENIUM_") | ||
|
||
CHAIN_DURATION: int = 10 | ||
"""Default duration of ActionChains in milleseconds""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it nice how easy this is?
So apparently ActionChains have an argument called
duration
that affect how long selenium lingers on the chain even if it finishes immediately. This update makes it possible for users to adjust the duration globally.