Ejemplo n.º 1
0
 def test_locator_by_name(self):
     """
     Tests that can create Locator.by_name(path)
     :return:
     """
     path = "//div/foobar"
     locator = Locator.by_name(path)
     assert locator != None
     assert locator.by == By.NAME
     assert locator.value == path
Ejemplo n.º 2
0
 def __init__(self, driver, url=None):
     super(GooglePage, self).__init__(driver, url)
     self.search_field = TextField(driver, Locator.by_name('q'))