Skip to content

Add Messenger and update versions of selenium, pytest, and ipython #164

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

Merged
merged 6 commits into from
May 7, 2018
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
7 changes: 7 additions & 0 deletions help_docs/method_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ self.maximize_window()

self.activate_jquery()

self.activate_messenger()

self.post_message(message, style="info", duration=None)

self.set_messenger_theme(theme="default", location="default",
max_messages="default")

self.get_property_value(selector, property, by=By.CSS_SELECTOR,
timeout=settings.SMALL_TIMEOUT)

Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pip
setuptools
ipython==5.5.0
selenium==3.8.1
ipython==5.6.0
selenium==3.11.0
nose==1.3.7
pytest==3.5.0
pytest-html==1.16.1
pytest==3.5.1
pytest-html==1.17.0
pytest-xdist==1.22.2
six==1.10.0
flake8==3.5.0
Expand Down
3 changes: 3 additions & 0 deletions seleniumbase/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
# Each loop is about 0.18 seconds. (Override by using "--highlights=TIMES".)
HIGHLIGHTS = 4

# Default time to keep messenger notifications visible (in seconds).
# Messenger notifications appear when reaching assert statements in Demo Mode.
DEFAULT_MESSAGE_DURATION = 2.55

# #####>>>>>----- MasterQA SETTINGS -----<<<<<#####
# ##### (Used when importing MasterQA as the parent class)
Expand Down
332 changes: 315 additions & 17 deletions seleniumbase/fixtures/base_case.py

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions seleniumbase/plugins/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ def pytest_addoption(parser):
default=None,
help="""Setting this overrides the default number of
highlight animation loops to have per call.""")
parser.addoption('--message_duration', action="store",
dest='message_duration',
default=None,
help="""Setting this overrides the default time that
messenger notifications remain visible when reaching
assert statements during Demo Mode.""")
parser.addoption('--ad_block', action="store_true",
dest='ad_block_on',
default=False,
Expand Down
8 changes: 8 additions & 0 deletions seleniumbase/plugins/selenium_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SeleniumBrowser(Plugin):
self.options.demo_mode -- the option to slow down Selenium (--demo_mode)
self.options.demo_sleep -- Selenium action delay in DemoMode (--demo_sleep)
self.options.highlights -- # of highlight animations shown (--highlights)
self.options.message_duration -- Messenger alert time (--message_duration)
self.options.ad_block -- the option to block some display ads (--ad_block)
self.options.verify_delay -- delay before MasterQA checks (--verify_delay)
self.options.timeout_multiplier -- increase defaults (--timeout_multiplier)
Expand Down Expand Up @@ -85,6 +86,12 @@ def options(self, parser, env):
dest='highlights', default=None,
help="""Setting this overrides the default number of
highlight animation loops to have per call.""")
parser.add_option(
'--message_duration', action="store",
dest='message_duration', default=None,
help="""Setting this overrides the default time that
messenger notifications remain visible when reaching
assert statements during Demo Mode.""")
parser.add_option(
'--ad_block', action="store_true",
dest='ad_block_on',
Expand Down Expand Up @@ -119,6 +126,7 @@ def beforeTest(self, test):
test.test.demo_mode = self.options.demo_mode
test.test.demo_sleep = self.options.demo_sleep
test.test.highlights = self.options.highlights
test.test.message_duration = self.options.message_duration
test.test.ad_block_on = self.options.ad_block_on
test.test.verify_delay = self.options.verify_delay # MasterQA
test.test.timeout_multiplier = self.options.timeout_multiplier
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='seleniumbase',
version='1.9.0',
version='1.10.0',
description='Web Automation & Testing Framework - http://seleniumbase.com',
long_description='Web Automation and Testing Framework - seleniumbase.com',
platforms='Mac * Windows * Linux * Docker',
Expand All @@ -19,11 +19,11 @@
install_requires=[
'pip',
'setuptools',
'ipython==5.5.0',
'selenium==3.8.1',
'ipython==5.6.0',
'selenium==3.11.0',
'nose==1.3.7',
'pytest==3.5.0',
'pytest-html==1.16.1',
'pytest==3.5.1',
'pytest-html==1.17.0',
'pytest-xdist==1.22.2',
'six==1.10.0',
'flake8==3.5.0',
Expand Down