Skip to content

Commit

Permalink
Merge pull request #78 from neetjn/0.1.7
Browse files Browse the repository at this point in the history
0.1.7
  • Loading branch information
neetjn committed Mar 6, 2018
2 parents fb56e56 + 5a08884 commit 3e2b538
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
11 changes: 10 additions & 1 deletion docs/source/component.rst
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ To check the visibility of a component group's child elements, you may refer to
component.group.check.invisible()
>> True, False
Checking Elements Enabled
-------------------------

Expand All @@ -619,3 +618,13 @@ Refer to the api methods `enabled` and `disabled` to check whether a component g
component.group.check.disabled()
>> True, False
Finding Child Elements
----------------------

Component group's offer a the `find` api method to dynamically search for child elements by their name.

.. code-block:: python
component.social.find('twitter')
>> Element
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
# built documents.
#
# The short X.Y version.
version = u'0.1.6'
version = u'0.1.7'
# The full version, including alpha/beta/rc tags.
release = u'0.1.6'
release = u'0.1.7'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 2 additions & 0 deletions pyscc/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,8 @@ def wrapper(self): # pylint: disable=missing-docstring
group.__group__ = [element for element, _ in iteritems(group_def) if element != '_']
group.fmt = MethodType(fmt, group)
group.check = CheckGroup(group)
# pylint: disable=no-value-for-parameter
group.find = lambda x: getattr(group, x)
return group

return wrapper
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
setup(
name='pyscc',
description='py-component-controller is an opinionated framework for structuring selenium test suites. This project depends on the pyselenium-js project.',
version='0.1.6',
version='0.1.7',
url='https://neetjn.github.io/py-component-controller/',
author='John Nolette',
author_email='john@neetgroup.net',
Expand Down
1 change: 1 addition & 0 deletions tests/test_component_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_element_group(self):
for sb in expected_attributes:
self.assertTrue(hasattr(self.social_buttons, sb))
self.assertIsInstance(getattr(self.social_buttons, sb), Element)
self.assertEqual(self.social_buttons.find('twitter'), self.social_buttons.twitter)

def test_element_group_checks(self):
"""test element group checks work as intended"""
Expand Down

0 comments on commit 3e2b538

Please sign in to comment.