def setUpClass(): driver = webdriver.Firefox() driver.implicitly_wait(60) loging_instance = Loginer(LOGIN , PASSWORD, SOCIAL_NETWORK, driver) loging_instance.log_in() main_page = MainPage(driver, TESTED_URL) main_page.login_with(SOCIAL_NETWORK) bubble_main = main_page.go_bubble_page() TestCase.achives_page = bubble_main.continue_quest() TestCase.achives_page.skip_explaining() TestCase.driver = driver
def setUpClass(): driver = webdriver.Firefox() driver.implicitly_wait(60) loging_instance = Loginer(LOGIN , PASSWORD, SOCIAL_NETWORK, driver) loging_instance.log_in() main_page = MainPage(driver, TESTED_URL) main_page = main_page.login_with(SOCIAL_NETWORK) panda_main = main_page.go_panda_page() TestCase.achives_page = panda_main.continue_quest() TestCase.achives_page.skip_explaining() TestCase.driver = driver TestCase.config = SafeConfigParser() TestCase.config.read(CONFIG_PATH)
def testAddTopicByClicks(self): main_page = MainPage(self.driver) main_page.top_menu.open_topic_creation() create_form = main_page.create_form() create_form.blog_select_open() create_form.blog_select_set_option(self.BLOG) create_form.set_title(self.TITLE) create_form.set_main_text(self.MAIN_TEXT) create_form.submit() topic_page = TopicPage(self.driver) topic_title = topic_page.topic.get_title() topic_text = topic_page.topic.get_text() self.assertEqual(self.TITLE, topic_title) self.assertIn(self.MAIN_TEXT, topic_text)
def test_user_auth(browser): user_login = MainPage(browser) user_login.open_login_page() user_login.verify_login_form()