def test_inspect_members(self): root = LocatorDict() root.menu.home = Locator.XPATH('//div') root.menu.contact = Locator.ID('contact') root.menu.login = Locator.CLASS('login') self.assertEqual( sorted(dir(root.menu)), sorted( ['home', 'contact', 'login', '_store', '_value', '_strategy']))
def test_class_locator(self): self.assertEqual(Locator.CLASS('main')._strategy, By.CLASS_NAME)