def add_test_server(self, ip, name, ssh_private_key, host_public_key, server_url): """Add a test server using the landing page. Args: ip: A string for the ip address of the server to add. name: A string for the name of the server to add. ssh_private_key: A string for the ssh private key of the server to add. host_public_key: A string for the host public key of the server to add. server_url: The base url portion of the setup page. """ self.go_to_landing_page(server_url) # Navigate to add server. add_server_button = self.get_element(UfOPageLayout.ADD_SERVER_BUTTON) add_server_button.click() WebDriverWait(self.driver, UfOPageLayout.DEFAULT_TIMEOUT).until( EC.visibility_of_element_located( ((UfOPageLayout.ADD_SERVER_MODAL)))) add_server_modal = self.driver.find_element( *LandingPage.ADD_SERVER_MODAL) server_form = ServerForm(self.driver) server_form.addServer(add_server_modal, ip, name, ssh_private_key, host_public_key)
def add_test_server(self, ip, name, ssh_private_key, host_public_key, server_url): """Add a test server using the setup page. Args: ip: A string for the ip address of the server to add. name: A string for the name of the server to add. ssh_private_key: A string for the ssh private key of the server to add. host_public_key: A string for the host public key of the server to add. server_url: The base url portion of the setup page. """ # Navigate to add server. self.driver.get(server_url + flask.url_for('setup')) proxy_server_add_template = self.get_element( UfOPageLayout.PROXY_SERVER_DISPLAY_TEMPLATE) server_form = ServerForm(self.driver) server_form.addServer(proxy_server_add_template, ip, name, ssh_private_key, host_public_key)
def add_test_server(self, ip, name, ssh_private_key, host_public_key, server_url): """Add a test server using the landing page. Args: ip: A string for the ip address of the server to add. name: A string for the name of the server to add. ssh_private_key: A string for the ssh private key of the server to add. host_public_key: A string for the host public key of the server to add. server_url: The base url portion of the setup page. """ self.go_to_landing_page(server_url) # Navigate to add server. add_server_button = self.get_element(UfOPageLayout.ADD_SERVER_BUTTON) add_server_button.click() WebDriverWait(self.driver, UfOPageLayout.DEFAULT_TIMEOUT).until( EC.visibility_of_element_located(((UfOPageLayout.ADD_SERVER_MODAL)))) add_server_modal = self.driver.find_element(*LandingPage.ADD_SERVER_MODAL) server_form = ServerForm(self.driver) server_form.addServer(add_server_modal, ip, name, ssh_private_key, host_public_key)