def disable_app(self, app_id): self.apps_menu_enabled = ut.return_element_id(self.driver, "app-category-0", 10) self.apps_menu_enabled.click() time.sleep(3) app_id_xpath = ".//*[@id='" + app_id + "']/input" self.disable_app_button = ut.return_element_xpath(self.driver, app_id_xpath, 10) self.disable_app_button.click() self.apps_menu_not_enabled = ut.return_element_id(self.driver, "app-category-1", 10) self.apps_menu_not_enabled.click() time.sleep(5)
def set_up_sftp(self): self.combobox_external_storage = Select( ut.return_element_id(self.driver, 'selectBackend')) self.combobox_external_storage.select_by_visible_text('SFTP') time.sleep(3) self.SFTP_Host = ut.return_element_xpath( self.driver, ".//*[@id='externalStorage']/tbody/tr[1]/td[4]/input[1]", 200) self.SFTP_Username = ut.return_element_xpath( self.driver, ".//*[@id='externalStorage']/tbody/tr[1]/td[4]/input[2]", 200) self.SFTP_Password = ut.return_element_xpath( self.driver, ".//*[@id='externalStorage']/tbody/tr[1]/td[4]/input[3]", 200) self.SFTP_remote_subfolder = ut.return_element_xpath( self.driver, ".//*[@id='externalStorage']/tbody/tr[1]/td[4]/input[4]", 200) self.SFTP_Host.send_keys(Config['SFTP_Host']) time.sleep(1) self.SFTP_Username.send_keys(Config['SFTP_Username']) time.sleep(1) self.SFTP_Password.send_keys(Config['SFTP_Password']) time.sleep(1) self.SFTP_remote_subfolder.send_keys(Config['SFTP_remote_subfolder']) time.sleep(3)
def go_to_disabled_apps(self): self.apps_menu_not_enabled = ut.return_element_id(self.driver, "app-category-1", 10) self.apps_menu_not_enabled.click() time.sleep(3)
def set_locators(self): self.apps_menu_not_enabled = ut.return_element_id(self.driver, "app-category-1", 10) self.apps_menu_enabled = ut.return_element_id(self.driver, "app-category-0", 10)
def logout(self): self.right_menu_open.click() self.right_menu_logout = ut.return_element_id(self.driver, 'logout', 15) time.sleep(1) self.right_menu_logout.click()