Skip to content

Commit

Permalink
Add a test to make sure still support elements locators that use css …
Browse files Browse the repository at this point in the history
…escape chars
  • Loading branch information
AutomatedTester committed Jun 10, 2016
1 parent f2ba921 commit 195f9bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/src/web/idElements.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<div id="with.dots">Element with a dot in the id</div>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def test_Should_Be_Able_To_Find_ASingle_Element_By_Numeric_Id(self):
element = self.driver.find_element(By.ID, "2")
self.assertEqual(element.get_attribute("id"), "2")

def test_should_be_able_to_find_an_element_with_css_escape(self):
self._load_page("idElements")
element = self.driver.find_element(By.ID, "with.dots")
self.assertEqual(element.get_attribute("id"), "with.dots")

def test_Should_Be_Able_To_Find_Multiple_Elements_By_Id(self):
self._load_page("nestedElements")
elements = self.driver.find_elements(By.ID, "test_id")
Expand Down

0 comments on commit 195f9bd

Please sign in to comment.