Skip to content

Commit 714a54e

Browse files
authored
Add support for the new ui button (#1536)
1 parent 848e305 commit 714a54e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

airgun/entities/host.py

+7
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ def search(self, value):
8484
view = self.navigate_to(self, 'All')
8585
return view.search(value)
8686

87+
def new_ui_button(self):
88+
"""Click New UI button and return the browser URL"""
89+
view = self.navigate_to(self, 'All')
90+
view.new_ui_button.click()
91+
view.wait_displayed()
92+
return self.browser.url
93+
8794
def reset_search(self):
8895
"""This function loads a HostsView and clears the searchbox."""
8996
view = HostsView(self.browser)

airgun/views/host.py

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class HostsView(BaseLoggedInView, SearchableViewMixinPF4):
221221
export = Text(".//a[contains(@class, 'btn')][contains(@href, 'hosts.csv')]")
222222
new = Text(".//div[@id='rails-app-content']//a[contains(normalize-space(.),'Create Host')]")
223223
register = PF4Button('OUIA-Generated-Button-secondary-2')
224+
new_ui_button = Text(".//a[contains(@class, 'btn')][contains(@href, 'new/hosts')]")
224225
select_all = Checkbox(locator="//input[@id='check_all']")
225226
table = SatTable(
226227
'.//table',

0 commit comments

Comments
 (0)