User-oriented Web UI browser tests in Python
MIT License
Bot releases are visible (Hide)
Published by yashaka about 2 years ago
selene.support._logging.wait_with(context, translations)
Added selene.support._logging experimental module with «predefined recipe» of wait_decorator for easier logging of Selene waiting commands (yet riskier, cause everything marked as experimental is a subject to change).
Now, given added allure dependency to your project, you can configure logging Selene commands to Allure report as simply as:
from selene.support.shared import browser
from selene import support
import allure_commons
browser.config._wait_decorator = support._logging.wait_with(
context=allure_commons._allure.StepContext
)
... or implement your own version of StepContext – feel free to use Alure's context manager as example or the one from Selene's browser__config__wait_decorator_with_decorator_from_support_logging_test.py test.
You also can pass a list of translations to be applied to final message to log, something like:
from selene.support.shared import browser
from selene import support
import allure_commons
browser.config._wait_decorator = support._logging.wait_with(
context=allure_commons._allure.StepContext,
translations=(
('browser.element', '$'),
('browser.all', '$$'),
)
)
But check the default value for this parameter, maybe you'll be fine with it;)
And remember, the majority of selene extensions from the support.* package, including its _logging
module – are things you'd better implement on your side to be less dependent to 3rd party helpers;) Feel free to Copy&Paste it into your code and adjust to your needs.
Published by yashaka about 2 years ago
Callable[[F], F]
Callable[[Wait[E]], Callable[[F], F]]
Published by yashaka about 2 years ago
NEW: added "opera" and "edge" support for shared browser
example:
from selene.support.shared import browser
# browser.config.browser_name = 'opera'
browser.config.browser_name = 'edge'
NEW: added config._wait_decorator
NEW: added config.click_by_js #420
for usage like in:
from selene.support.shared import browser
# browser.config.click_by_js = True
# '''
# if we would want to make all selene clicks to work via JS
# as part of some CRAZY workaround, or maybe to make tester faster o_O :p
# (it was a joke, nothing will be much faster :D with click via js)
# '''
button = browser.element('#btn').with_(click_by_js=True)
'''
to make all clicks for element('#btn') to work via js
as part of some workaround ;)
'''
button.click()
...
button.click()
Published by yashaka over 2 years ago
browser.all('[id^=google_ads]').perform(command.js.remove)
Published by yashaka over 2 years ago
webdriver_manager.utils
in imports, like in:
from webdriver_manager.utils import ChromeType
webdriver_manager.core.utils
, like in:
from webdriver_manager.core.utils import ChromeType
Published by yashaka over 2 years ago
browser.config.driver = HERE
Published by yashaka over 2 years ago
Published by aleksandr-kotlyar about 3 years ago
Published by yashaka about 3 years ago
Published by aleksandr-kotlyar over 3 years ago
fixes broken 1.0.1
Published by aleksandr-kotlyar over 3 years ago
Published by aleksandr-kotlyar over 3 years ago
Published by aleksandr-kotlyar over 3 years ago
We moved to poetry for better dependency resolving.
But don't worry! It affects only selene development lifecycle and selene contributors.
black
and pylint
information.Published by yashaka almost 5 years ago
fixed entity.with_(...)
Published by yashaka almost 5 years ago
no test coverage;
do updated docs
tests/acceptance/shared_browser/straightforward_style_test.py
no hooks (and so no screenshots in error messages);
no temporal support for 1.0.0 aliases for some methods
old implementation of everything still exists in selene.support.past.*
Published by yashaka almost 5 years ago
Published by yashaka almost 7 years ago
releasing 1.0.0a9 with selene.browser.* over deprecated selene.tools.*; config.base_url over deprecated config.app_host; and new selene api entry point as 'from selene.api import *'
Published by SergeyPirogov almost 7 years ago