diff --git a/airgun/entities/package.py b/airgun/entities/package.py index 23c798882..16b00c550 100644 --- a/airgun/entities/package.py +++ b/airgun/entities/package.py @@ -32,6 +32,16 @@ def read(self, entity_name, repository='All Repositories', widget_names=None): view = self.navigate_to(self, 'Details', entity_name=entity_name, repository=repository) return view.read(widget_names=widget_names) + def click_install_on_link(self, entity_name, repository='All Repositories'): + """Click on host link 'Installed On' which is present on Package detail tab + + :param str entity_name: the package name to read. + :param str repository: repository name to select when searching for the + package. + """ + view = self.navigate_to(self, 'Details', entity_name=entity_name, repository=repository) + view.install_on_host_link.click() + @navigator.register(PackageEntity, 'All') class ShowAllPackages(NavigateStep): diff --git a/airgun/views/package.py b/airgun/views/package.py index 0f795ce01..51e2260de 100644 --- a/airgun/views/package.py +++ b/airgun/views/package.py @@ -51,6 +51,7 @@ def is_displayed(self): class PackageDetailsView(BaseLoggedInView): breadcrumb = BreadCrumb() + install_on_host_link = Text(locator='*//span[contains(@ng-show, "installedPackageCount")]') @property def is_displayed(self):