def test_method_getelement(self): """Testcase: test_004_instance_maximized""" cfg = self.page.copy() page = PageBase(self.bot, **cfg) ASSERT.is_instance(page, PageBase) ASSERT.equals(self.bot.curr_driver.current_url, cfg.get('url')) for config_control in self.page.get('controls'): name = config_control.get('name') instance_name = config_control.get('instance') ctl = page.get_element(config_control) ASSERT.in_list(name, dir(page)) if instance_name == 'ControlBase': ASSERT.is_instance(ctl, ControlBase)
def test_013_method_getelement_ascontrol(self): """Testcase: test_013_method_getelement_ascontrol""" page = PageBase(self.bot, self.url) element = page.get_element(self.selectors[0], as_control=True) self.assertIsInstance(element, ControlBase)
def test_012_method_getelement_aswebelement(self): """Testcase: test_012_method_getelement_aswebelement""" page = PageBase(self.bot, self.url) element = page.get_element(self.selectors[0]) self.assertIsInstance(element, WebElement)