Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
yashaka committed May 29, 2022
2 parents 1e5171a + 7835c29 commit 07e6842
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions selene/support/by.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def id(attribute_value):
return By.ID, attribute_value


def class_name(value):
return By.CLASS_NAME, value


def name(attribute_value):
return By.NAME, attribute_value

Expand Down
4 changes: 4 additions & 0 deletions tests/bys_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ def test_by_partial_text():

def test_by_escape_text_quotes_for_xpath():
assert by._escape_text_quotes_for_xpath('test') == 'concat("", "test")'


def test_by_class_name():
assert by.class_name("test") == ("class name", "test")

0 comments on commit 07e6842

Please sign in to comment.