示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)