From 50e36186e9e26c58e649bf0cc1c3a824b74b02ee Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:24:58 -0400 Subject: [PATCH] Add entity that reads filled searchbox on new and old hosts pages (#1589) (#1594) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add entity that reads filled searchbox on new and old hosts pages * Change docstrings (cherry picked from commit 4cb153ef75f6015423c12e2b22d9a225dfd96960) Co-authored-by: Ladislav VaĊĦina --- airgun/entities/all_hosts.py | 7 +++++++ airgun/entities/host.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/airgun/entities/all_hosts.py b/airgun/entities/all_hosts.py index 719fc24db..064a5ddc7 100644 --- a/airgun/entities/all_hosts.py +++ b/airgun/entities/all_hosts.py @@ -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') diff --git a/airgun/entities/host.py b/airgun/entities/host.py index c18ac0104..f4dcc5f88 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 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')