def test_method_waittext(self, ctl_cfg): """Testcase: test_method_waittext""" self.setup_login_to_inputs() ctl_setup = ControlBase(self.bot, **self.btn_click_invisible) ctl_setup.click() ctl_setup.wait_visible(timeout=7) # end setup ctl = ControlBase(self.bot, **getattr(self, ctl_cfg[0])) ctl.reload() ASSERT.true(ctl.wait_text(ctl_cfg[1], timeout=7)) ASSERT.equals(ctl.text, ctl_cfg[1])
def test_method_reload_base(self, selector, instance): """Testcase: test_method_setcssrule""" # must be supported cfg_base = { "name": "txt_username_base", "locator": "css selector", "selector": selector, "instance": instance, "on_instance_search": False, } control = ControlBase(self.bot, **cfg_base) ASSERT.equals(control.on_instance_search, False) ASSERT.none(control.element) # Real test behaviour cfg_base.update({"on_instance_search": True}) control.reload(**cfg_base) ASSERT.equals(control.on_instance_search, True) ASSERT.is_instance(control.element, WebElement)