def test_login_verify(self): #driver = self.driver self.driver.get( "https://mtrx.travel/sv?gclid=EAIaIQobChMI_JHoqpyD6QIVxIGyCh3T0A4TEAAYASAAEgKmM_D_BwE" ) landingpage1 = LandingPage(self.driver) landingpage1.navigate_to_loginpage() print("homepage displayed") Loginpage1 = LoginPage(self.driver) Loginpage1.enter_username("*****@*****.**") Loginpage1.enter_password("yyyyy") Loginpage1.click_login() time.sleep(3) secondpage1 = SecondPage(self.driver) secondpage1.click_mittkonto() logoutpage1 = LogoutPage(self.driver) logoutpage1.click_logout() time.sleep(3)
def verify_there_are_no_available_volumes(self, timeout_in_seconds): self.tester.send_keys_by_css(self._search_input_field_css, "available") self.tester.wait_for_text_present_by_css(LandingPage(self)._item_count_css, "0", timeout_in_seconds)
def verify_volume_view_page_loaded(self): self.tester.wait_for_text_present_by_id(LandingPage(self)._page_title_id, self._volume_view_page_title) self.tester.wait_for_visible_by_id(LandingPage(self)._refresh_button_id)
def verify_buckets_view_page_loaded(self): self.tester.driver.switch_to.window( self.tester.driver.window_handles[0]) self.tester.wait_for_text_present_by_id( LandingPage(self)._page_title_id, self._buckets_view_page_title) self.tester.wait_for_visible_by_id(LandingPage(self)._refresh_button_id)
def verify_there_are_no_running_instances(self): self.tester.send_keys_by_css(self._search_input_field_css, "running") self.tester.wait_for_text_present_by_css(LandingPage(self)._item_count_css,"0")
def verify_there_are_no_completed_snapshots(self): self.tester.send_keys_by_css( LandingPage(self)._search_input_field_css, "completed") self.tester.wait_for_text_present_by_css( LandingPage(self)._item_count_css, "0")
def click_action_register_as_image(self, snapshot_id): self.tester.click_element_by_id( LandingPage(self)._resource_action_menu_id.format(snapshot_id)) self.tester.click_element_by_css( self._register_as_image_actions_menu_item_css.format(snapshot_id))
def click_action_create_volume_from_snapshot(self, snapshot_id): self.tester.click_element_by_id( LandingPage(self)._resource_action_menu_id.format(snapshot_id)) self.tester.click_element_by_css( self._create_volume_from_snapshot_actions_menu_item_css.format( snapshot_id))
def goto_snapshot_detail_page_via_actions(self, snapshot_id): self.tester.click_element_by_id( LandingPage(self)._resource_action_menu_id.format(snapshot_id)) self.tester.click_element_by_css( self._view_details_actions_menu_item_css.format(snapshot_id))
def click_action_delete_snapshot_on_view_page(self, snapshot_id): self.tester.click_element_by_id( LandingPage(self)._resource_action_menu_id.format(snapshot_id)) self.tester.click_element_by_css( self._delete_snapshot_actions_menu_item_css.format(snapshot_id))