def test_navigator(platform: crosstest.Platform, request): t = time.time() test = platform.setup(request) print('time to get test platform {}'.format(time.time() - t)) t = time.time() driver = test.driver() print('time to get driver {}'.format(time.time() - t)) t = time.time() app = App(driver) print('time to get app model {}'.format(time.time() - t)) # manual navigation connection configuration navigate = Navigator(app.google_home) navigate.connect_all( (app.google_home.navigate_to_GoogleSearchPage, app.google_search), (app.google_search.navigate_to_LinkedinHomePage, app.linkedin_home)) # money time for this feature t = time.time() navigate.to(app.linkedin_home) print('time to get navigation calc {}'.format(time.time() - t)) t = time.time() navigate.perform() print('time to get navigation {}'.format(time.time() - t)) # this is what the tester will want to test app.linkedin_home.register.register_and_submit(firstname='test123', lastname='456', email='testmail', password='******') app.driver.quit()
def __init__(self, driver): Page.__init__(self, driver) self.google_home = GoogleHomePage(driver) self.google_search = GoogleSearchPage(driver) self.linkedin_home = LinkedinHomePage(driver) self.navigate = Navigator(self.google_home, auto_connect=self)
def __init__(self, driver, platform): Page.__init__(self, driver, platform=platform) self.google_home = GoogleHomePage(driver) self.google_search = GoogleSearchPage(driver) self.linkedin_home = LinkedinHomePage(driver) self.ynet_home = YnetHomePage(driver) self.qaviton_home = QavitonHomePage(driver) self.navigate = Navigator(self.google_home, auto_connect=self)
def __init__(self, driver, platform): Page.__init__(self, driver, platform=platform) self.home = HomePage(driver) self.register = RegisterPage(driver) self.navigate = Navigator(self.home, auto_connect=self)