Skip to content
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

Merged
merged 7 commits into from
Mar 8, 2024

Conversation

bandophahita
Copy link
Contributor

@bandophahita bandophahita commented Mar 5, 2024

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.

@bandophahita bandophahita marked this pull request as ready for review March 5, 2024 20:27
@bandophahita bandophahita requested a review from a team March 5, 2024 20:27
Copy link
Member

@perrygoy perrygoy left a 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
Copy link
Member

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?

Comment on lines +7 to +20
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"""
Copy link
Member

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?

@bandophahita bandophahita merged commit e9c2006 into ScreenPyHQ:trunk Mar 8, 2024
12 checks passed
@bandophahita bandophahita deleted the actionchain_speedup branch March 19, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants