From a4c3e63b4ddb409b1a4f6d56ba740fdac120da8e Mon Sep 17 00:00:00 2001 From: hesteban-tuenti Date: Thu, 23 Nov 2023 12:27:27 +0100 Subject: [PATCH] review fix --- toolium/pageobjects/common_object.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toolium/pageobjects/common_object.py b/toolium/pageobjects/common_object.py index a3d86ccb..03690834 100644 --- a/toolium/pageobjects/common_object.py +++ b/toolium/pageobjects/common_object.py @@ -112,8 +112,7 @@ def _ios_automatic_context_selection(self): 'bundleId' in item and item['bundleId'] == self.driver.capabilities['bundleId']), None) if context_id: - if self.driver.context != context_id: - self.driver.switch_to.context(context_id) + self._switch_to_new_context(context_id) else: raise KeyError("WEBVIEW context not found") else: