Skip to content

Commit

Permalink
Add entity that reads filled searchbox on new and old hosts pages (#1589
Browse files Browse the repository at this point in the history
)

* Add entity that reads filled searchbox on new and old hosts pages

* Change docstrings
  • Loading branch information
LadislavVasina1 authored Oct 10, 2024
1 parent 1728a06 commit 4cb153e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions airgun/entities/all_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ def search(self, host_name):
view.wait_displayed()
return view.search(host_name)

def read_filled_searchbox(self):
"""Read filled searchbox"""
view = self.navigate_to(self, 'All')
self.browser.plugin.ensure_page_safe(timeout='5s')
view.wait_displayed()
return view.searchbox.read()

def read_table(self):
"""Read All Hosts table"""
view = self.navigate_to(self, 'All')
Expand Down
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 read_filled_searchbox(self):
"""Read filled searchbox"""
view = self.navigate_to(self, 'All')
self.browser.plugin.ensure_page_safe(timeout='5s')
view.wait_displayed()
return view.searchbox.read()

def new_ui_button(self):
"""Click New UI button and return the browser URL"""
view = self.navigate_to(self, 'All')
Expand Down

0 comments on commit 4cb153e

Please sign in to comment.