diff --git a/airgun/entities/redhat_repository.py b/airgun/entities/redhat_repository.py index 38e55508b..100c4932e 100644 --- a/airgun/entities/redhat_repository.py +++ b/airgun/entities/redhat_repository.py @@ -18,6 +18,7 @@ def search(self, value, category='Available', types=None): eg: RPM, OSTree ... """ view = self.navigate_to(self, 'All') + wait_for(lambda: view.search_box.is_displayed, timeout=10, delay=1) return view.search(value, category=category, types=types) def read(self, entity_name=None, category='Available', recommended_repo=None): diff --git a/airgun/views/redhat_repository.py b/airgun/views/redhat_repository.py index 2a96b04ba..80d5f8c9d 100644 --- a/airgun/views/redhat_repository.py +++ b/airgun/views/redhat_repository.py @@ -208,8 +208,12 @@ class RedHatRepositoriesView(BaseLoggedInView): title = Text("//h1[contains(., 'Red Hat Repositories')]") search_category = RepositorySearchCategory(".//div[button[@id='search-list-select']]") - search_box = TextInput(locator=".//input[@aria-label='Search input']") - search_button = Text(".//button[@aria-label='Search']") + search_box = TextInput( + locator='//*[@id="redhatRepositoriesPage"]//following::input[@aria-label="Search input"]' + ) + search_button = Text( + '//*[@id="redhatRepositoriesPage"]//following::button[@aria-label="Search"]' + ) search_types = RepositorySearchTypes(".//div[button[@data-id='formControlsSelectMultiple']]") search_clear = Text(".//span[@class = 'fa fa-times']") recommended_repos = Text(".//div[contains(@class, 'bootstrap-switch wrapper')]")