def setUpClass(cls): BaseTest.initEnvironment(cls) BaseTest.login(cls) home_page = HomePage(cls.driver) home_page.check_if_loaded() home_page.click_app("common") home_page.check_app_loaded() home_page.click_channel_link() cls.channel_page = ChannelPage(cls.driver)
def setUpClass(cls): BaseTest.initEnvironment(cls) BaseTest.login_private(cls) home_page = HomePage(cls.driver) home_page.check_if_loaded() home_page.click_app("my") home_page.check_app_loaded() home_page.click_order_link() cls.order_page = OrderPage(cls.driver) cls.order_page.check_orderpage_loaded()
def setUpClass(cls): BaseTest.initEnvironment(cls) # log in BaseTest.login(cls) # wait for home page loaded home_page = HomePage(cls.driver) home_page.check_if_loaded() home_page.click_app("common") home_page.check_app_loaded() home_page.click_order_link() cls.order_page = OrderPage(cls.driver) cls.order_page.check_orderpage_loaded()
def setUpClass(cls): BaseTest.initEnvironment(cls) # log in BaseTest.login_private(cls) # wait for home page loaded home_page = HomePage(cls.driver) home_page.check_if_loaded() home_page.click_app("my") home_page.check_app_loaded() home_page.click_webhooks_link() cls.webhook_page = WebHookPage(cls.driver) assert cls.webhook_page.check_page_loaded()
def delete_all_webhooks(): self = helper BaseTest.initEnvironment(self) BaseTest.login_private(self) # wait for home page loaded home_page = HomePage(self.driver) home_page.check_if_loaded() home_page.click_app("contest") home_page.check_app_loaded() home_page.click_webhooks_link() webhook_page = WebHookPage(self.driver) assert webhook_page.check_page_loaded() webhook_page.delete_all_webhooks() self.driver.quit()
def run(self): print self.name + "=> begin to execute run() method" if self.urls.empty(): print self.name + ": the queue is empty now!" return try: BaseTest.initEnvironment(self) BaseTest.login_private(self) # wait for home page loaded home_page = HomePage(self.driver) home_page.check_if_loaded() home_page.click_app("contest") home_page.check_app_loaded() home_page.click_webhooks_link() webhook_page = WebHookPage(self.driver) webhook_page.check_page_loaded() while True: try: if self.urls.empty(): print self.name + ": the queue is empty now!" break; url = self.urls.get() print self.name + ": start to add url:" + url webhook_page.add_webhook(url) if webhook_page.verify_webhook_url(url): print self.name + ": success add url: " + url else: print self.name + ": failed to add url: " + url + " due to verify failed." # helper.save_screen_shot(self.driver, helper.get_current_time()) except Exception, e: print self.name + ": failed to add url: " + url + " due to exception: " + e.message print e.message except Exception, e: print self.name + "=> run() failed due to " + e.message
def setUpClass(cls): # pre_condition # Create and pay charges for live mode before test suites begin for i in range(100): live_charges = BatchPayment() live_charges.run() BaseTest.initEnvironment(cls) BaseTest.login_private(cls) # wait for home page loaded home_page = HomePage(cls.driver) home_page.check_if_loaded() home_page.click_app("my") home_page.check_app_loaded() home_page.click_order_link() cls.order_page = OrderPage(cls.driver) cls.order_page.check_orderpage_loaded()