diff --git a/airgun/entities/host.py b/airgun/entities/host.py index 4b673bc86..c18ac0104 100644 --- a/airgun/entities/host.py +++ b/airgun/entities/host.py @@ -84,6 +84,13 @@ def search(self, value): view = self.navigate_to(self, 'All') return view.search(value) + def new_ui_button(self): + """Click New UI button and return the browser URL""" + view = self.navigate_to(self, 'All') + view.new_ui_button.click() + view.wait_displayed() + return self.browser.url + def reset_search(self): """This function loads a HostsView and clears the searchbox.""" view = HostsView(self.browser) diff --git a/airgun/views/host.py b/airgun/views/host.py index 5ecdbb190..e7d1c536a 100644 --- a/airgun/views/host.py +++ b/airgun/views/host.py @@ -221,6 +221,7 @@ class HostsView(BaseLoggedInView, SearchableViewMixinPF4): export = Text(".//a[contains(@class, 'btn')][contains(@href, 'hosts.csv')]") new = Text(".//div[@id='rails-app-content']//a[contains(normalize-space(.),'Create Host')]") register = PF4Button('OUIA-Generated-Button-secondary-2') + new_ui_button = Text(".//a[contains(@class, 'btn')][contains(@href, 'new/hosts')]") select_all = Checkbox(locator="//input[@id='check_all']") table = SatTable( './/table',