def test_send_a_message(self, message_data): sp = SearchPage(self.driver) sp.move_to_search() sp.search_for_profile() tpp = TestedProfilePage(self.driver) tpp.send_message(message_data) if not self.assertEqual(tpp.check_message_content(), message_data): captureScreen(self, 'send_message')
def test_give_a_like(self): sp = SearchPage(self.driver) sp.move_to_search() sp.search_for_profile() tpp = TestedProfilePage(self.driver) tpp.pick_a_first_photo() tpp.give_a_like() if not self.assertTrue(self.driver.find_elements_by_id(TestedPage.LIKE_BUTTON)[0].is_selected()): captureScreen(self, 'give_a_like_fail')
def test_add_comment(self): sp = SearchPage(self.driver) sp.move_to_search() sp.search_for_profile() tpp = TestedProfilePage(self.driver) tpp.pick_a_first_photo() tpp.add_a_comment() if not self.assertEqual( tpp.get_added_comment_content(), f'{TestData.login} {TestData.comment_content}'): captureScreen(self, 'add_a_comment_fail')