Ejemplo n.º 1
0
 def readPage_init(self):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.read = ReadPage(self.driver)
     self.searchpanel = SearchPanelPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.pubmethod.clearApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     yield
     logging.info("****用例执行结束****")
     logging.info("")
 def personalCenter_init(self):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod= PubMethod(self.driver)
     self.toolbarpanel = ToolBarPanelPage(self.driver)
     self.personalcenter = PersonalCenterPage(self.driver)
     self.news = NewsPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.mbackToHomeOrNegative()
     yield
     logging.info("****用例执行结束****")
     logging.info("")
Ejemplo n.º 3
0
 def search_init(self):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.searchpanel = SearchPanelPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.home.clickHome()
     self.home.clickHomeOnPage(HOME_PAGE)
     self.pubmethod.mbackToHomeOrNegative()
     yield
     logging.info("****用例执行结束****")
     logging.info("")
Ejemplo n.º 4
0
 def news_init(self, scope="function"):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.more = MorePage(self.driver)
     self.news = NewsPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.base.unlock()
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.mbackToHomeOrNegative()
     yield
     logging.info("****用例执行结束****")
     logging.info("")
Ejemplo n.º 5
0
 def quit_init(self, scope="function"):
     self.base = Base(self.driver)
     self.more = MorePage(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.windowstab = WindowsTabPage(self.driver)
     self.quit = ToolBarPanelPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.base.unlock()
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.home.clickHome()
     self.home.clickHomeOnPage(HOME_PAGE)
     yield
     logging.info("****用例执行结束****")
     logging.info("")
Ejemplo n.º 6
0
 def setUp_init(self):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.searchpanel = SearchPanelPage(self.driver)
     self.toolbarpanel = ToolBarPanelPage(self.driver)
     self.setup = SetUpPage(self.driver)
     self.news = NewsPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.base.browserWatcher()
     self.home.clickHome()
     self.home.clickHomeOnPage(HOME_PAGE)
     yield
     logging.info("****用例执行结束****")
     logging.info("")
 def down_init(self, scope="function"):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.more = MorePage(self.driver)
     self.search = SearchPanelPage(self.driver)
     self.tool = ToolBarPanelPage(self.driver)
     self.set = SetUpPage(self.driver)
     self.down = DownPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.base.unlock()
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.home.clickHome()
     self.home.clickHomeOnPage(HOME_PAGE)
     yield
     logging.info("****用例执行结束****")
     logging.info("")
Ejemplo n.º 8
0
 def collectionAndHistory_init(self):
     self.base = Base(self.driver)
     self.home = HomePage(self.driver)
     self.negativescreen = NegativeScreenPage(self.driver)
     self.addtohome = AddToHomePage(self.driver)
     self.pubmethod = PubMethod(self.driver)
     self.searchpanel = SearchPanelPage(self.driver)
     self.toolbarpanel = ToolBarPanelPage(self.driver)
     self.collectionandhistory = CollectionAndHistoryPage(self.driver)
     self.news = NewsPage(self.driver)
     self.windowstab = WindowsTabPage(self.driver)
     logging.info("")
     logging.info("****开始执行用例****")
     self.pubmethod.stopApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.startApp(BROWSER_PACKAGE_NAME)
     self.pubmethod.mbackToHomeOrNegative()
     yield
     logging.info("****用例执行结束****")
     logging.info("")
Ejemplo n.º 9
0
 def __init__(self, driver):
     self.base = Base(driver)
     self.home = HomePage(driver)