예제 #1
0
 def test_013_method_get_attrs(self):
     """Testcase: test_013_method_get_attrs"""
     control = ControlBase(self.bot, selector=self.ele_searcher)
     attrs = control.get_attrs(['id', 'class'])
     self.assertEqual(attrs[0]['name'], 'id')
     self.assertEqual(attrs[0]['value'], 'docsQuery')
     self.assertEqual(attrs[1]['name'], 'class')
     self.assertIn('form-control', attrs[1]['value'])
예제 #2
0
 def test_method_get_attrs(self):
     """Testcase: test_method_get_attrs"""
     cfg_form = self.form_login.copy()
     cfg_form.update({"on_instance_search": True})
     control = ControlBase(self.bot, **cfg_form)
     attrs = control.get_attrs(['id', 'class'])
     ASSERT.equals(attrs[0]['name'], 'id')
     ASSERT.equals(attrs[0]['value'], 'frmLogin')
     ASSERT.equals(attrs[1]['name'], 'class')
     ASSERT.in_list('ember-view', attrs[1]['value'])