diff --git a/cfme/common/vm.py b/cfme/common/vm.py index 2429693bd6..15d69b9370 100644 --- a/cfme/common/vm.py +++ b/cfme/common/vm.py @@ -280,8 +280,14 @@ def open_console(self, console='VM Console', invokes_alert=None): view = navigate_to(self, 'Details') - # Click console button given by type - view.toolbar.access.item_select(console, handle_alert=invokes_alert) + # dismiss_any_alerts() call closed subsequent alerts needed for vmrc + # below code is needed to fix such issue + try: + view.browser.IGNORE_SUBSEQUENT_ALERTS = True + # Click console button given by type + view.toolbar.access.item_select(console, handle_alert=invokes_alert) + finally: + view.browser.IGNORE_SUBSEQUENT_ALERTS = False self.vm_console def open_details(self, properties=None): diff --git a/cfme/utils/appliance/implementations/common.py b/cfme/utils/appliance/implementations/common.py index ae04f389ff..e85b9337aa 100644 --- a/cfme/utils/appliance/implementations/common.py +++ b/cfme/utils/appliance/implementations/common.py @@ -9,6 +9,7 @@ class HandleModalsMixin(object): + IGNORE_SUBSEQUENT_ALERTS = False @property def _modal_alert(self): return Modal(parent=self) @@ -92,7 +93,8 @@ def handle_alert(self, cancel=False, wait=30.0, squash=False, prompt=None, check self.logger.info(' accepting') popup.accept() # Should any problematic "double" alerts appear here, we don't care, just blow'em away. - self.dismiss_any_alerts() + if not self.IGNORE_SUBSEQUENT_ALERTS: + self.dismiss_any_alerts() return True except TimedOutError: # we waited (or didn't), and there was no alert