Skip to content

Commit

Permalink
Add support for the new ui button (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible authored Aug 28, 2024
1 parent 848e305 commit 714a54e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions airgun/entities/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions airgun/views/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 714a54e

Please sign in to comment.