def run(self,browser,logger): auth = AuthForm(browser,logger) filter = Filters(browser,logger) navigation = Navigation(browser,logger) window = BrowserWindow(browser, logger) window.open(settings.target_url) self.do_method(auth.login_with_vk_full_scale,profiling_events.login_event,auth.FilterUserNonVipVK) navigation.goto_main_top_menu_item(u"Знакомства") filter.init_age_filter() if filter.get_age_search_interval_value() < self.minimal_age_interval: filter.drag_left_age_search_slider_to_min() sleep(5) filter.drag_right_age_search_slider_to_max() filter.close_age()
def run(self, browser, logger): # Get local session of firefox window = BrowserWindow(browser, logger) auth = AuthForm(browser,logger) navigation = Navigation(browser,logger) profile = Profile(browser,logger) filter = Filters(browser,logger) window.open(settings.target_url) # implement URL check self.do_method(auth.login_with_vk_full_scale,profiling_events.login_event,auth.FilterUserNonVipVK) for age in self.ages_list: self.logger.log("For age = " + str(age) + " search age interval = " + str(self.ages_list[age])) profile.set_age(age) navigation.goto_main_top_menu_item(u"Знакомства") navigation.validate_in_search() filter.init_age_filter() filter.drag_right_age_search_slider_to_max() filter.drag_right_age_search_slider_to_min() if self.ages_list[age] != filter.get_age_search_interval_value(): raise TestFailedException("Wrong mininal age search interval") profile.set_age(auth.FilterUserNonVipVK.age) window.close()
def run(self,browser,logger): auth = AuthForm(browser,logger) filter = Filters(browser,logger) navigation = Navigation(browser,logger) window = BrowserWindow(browser, logger) window.open(settings.target_url) self.do_method(auth.login_with_vk_full_scale,profiling_events.login_event,auth.FilterUserNonVipVK) navigation.goto_main_top_menu_item(u"Знакомства") filter.init_age_filter() if filter.get_age_search_interval_value() < self.minimal_age_interval: filter.drag_left_age_search_slider_to_min() sleep(5) filter.drag_right_age_search_slider_to_max() filter.close_age() filter.select_online() for sex in range(self.sexes_amount): filter.change_sex() for goal in filter.get_goals(): filter.select_goal(goal) # checking for validate_user_amount filter is working self.logger.log("Validating users in search box") filter.validate_in_search_goal(goal=goal,online=True) filter.change_sex() window.close()
def run(self, browser, logger): self.browser = browser self.logger = logger window = BrowserWindow(browser, logger) auth = AuthForm(browser,logger) navigation = Navigation(browser,logger) profile = Profile(browser,logger) filter = Filters(browser,logger) marks = Marks(browser,logger) window.open(settings.target_url) # implement URL check self.do_method(auth.login_with_vk_full_scale,profiling_events.login_event,auth.FilterUserNonVipVK) profile.set_age(self.age_min) navigation.goto_main_top_menu_item(u"Знакомства") filter.init_age_filter() filter.drag_left_age_search_slider_to_max() sleep(5) for age in reversed(range(self.age_max_max-self.age_max_min)): filter.init_age_filter() filter.drag_right_age_search_slider_backward() sleep(5) filter.validate_search_users_in_search_age(filter.get_age_search_interval_list()) profile.set_age(auth.FilterUserNonVipVK.age) window.close()