diff --git a/lib/galaxy_test/selenium/test_personal_information.py b/lib/galaxy_test/selenium/test_personal_information.py index 75e3f64968c..59d92cdca7a 100644 --- a/lib/galaxy_test/selenium/test_personal_information.py +++ b/lib/galaxy_test/selenium/test_personal_information.py @@ -1,5 +1,3 @@ -from selenium.webdriver.common.by import By - from galaxy_test.selenium.framework import ( selenium_test, SeleniumTestCase, @@ -90,9 +88,6 @@ class TestManageInformation(SeleniumTestCase): @selenium_test def test_user_address(self): - def get_address_form(): - return self.find_element_by_selector("div.ui-portlet-section > div.portlet-content") - self.register(self._get_random_email()) self.navigate_to_manage_information() self.components.change_user_address.address_button.wait_for_and_click() @@ -114,7 +109,7 @@ class TestManageInformation(SeleniumTestCase): for input_field_label in address_field_labels: input_value = self._get_random_name(prefix=input_field_label) address_fields[input_field_label] = input_value - input_field = self.get_address_input_field(get_address_form(), input_field_label) + input_field = self.get_address_input_field(input_field_label) self.clear_input_field_and_write(input_field, input_value) # save new address self.components.change_user_email.submit.wait_for_and_click() @@ -125,7 +120,7 @@ class TestManageInformation(SeleniumTestCase): # check if address was saved correctly for input_field_label in address_fields.keys(): - input_field = self.get_address_input_field(get_address_form(), input_field_label) + input_field = self.get_address_input_field(input_field_label) assert input_field.get_attribute("value") == address_fields[input_field_label] def navigate_to_manage_information(self): @@ -136,8 +131,8 @@ class TestManageInformation(SeleniumTestCase): element.clear() element.send_keys(new_input_text) - def get_address_input_field(self, address_form, input_field_label): - return address_form.find_element(By.CSS_SELECTOR, f"[data-label='{input_field_label}'] > div > div > input") + def get_address_input_field(self, input_field_label): + return self.wait_for_selector_visible(f"[data-label='{input_field_label}'] > div > div > input") class TestDeleteCurrentAccount(SeleniumTestCase):