From 2599e411dc17751ae2fb062c109407d81d3bdfbf Mon Sep 17 00:00:00 2001 From: Alvaro Laserna Date: Thu, 18 Jul 2024 13:54:04 +0300 Subject: [PATCH 1/2] fix bug --- tests/appium_app_test.py | 2 +- tests/appium_tests.py | 1 + testui/elements/testui_element.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/appium_app_test.py b/tests/appium_app_test.py index 574cdb0..1d3c02b 100644 --- a/tests/appium_app_test.py +++ b/tests/appium_app_test.py @@ -31,7 +31,7 @@ def test_appium_app(self, appium_driver: TestUIDriver): # .move_to(x=500, y=1000).release().perform() appium_driver.actions().w3c_actions = ActionBuilder( - appium_driver.get_driver, + appium_driver.get_driver(), mouse=PointerInput(interaction.POINTER_TOUCH, "touch")) actions = appium_driver.actions() diff --git a/tests/appium_tests.py b/tests/appium_tests.py index 03bfac1..7ffc08a 100644 --- a/tests/appium_tests.py +++ b/tests/appium_tests.py @@ -28,6 +28,7 @@ def test_screenshot_methods(self, selenium_driver: TestUIDriver): selenium_driver.navigate_to( "https://github.com/testdevlab/Py-TestUI#image-recognition" ) + selenium_driver.e("css", "[data-content=\"README\"]").wait_until_visible() selenium_driver.start_recording_screen() time.sleep(1) selenium_driver.stop_recording_and_compare( diff --git a/testui/elements/testui_element.py b/testui/elements/testui_element.py index a20963d..5c15b2d 100644 --- a/testui/elements/testui_element.py +++ b/testui/elements/testui_element.py @@ -72,7 +72,7 @@ def __init__(self, driver, locator_type: str, locator: str): self.__soft_assert = driver.soft_assert self.testui_driver = driver self.device_name = driver.device_name - self.driver = driver.get_driver + self.driver = driver.get_driver() self.locator = locator self.locator_type = locator_type self.__is_collection = False @@ -495,6 +495,7 @@ def click(self): return self except Exception as error: err = error + print(error) time.sleep(0.2) return self.__show_error( f"{logger.bcolors.FAIL}{err} {self.device_name}: Element " From c4b19c2459f41ef899498bc5fb98c0e27bb1042a Mon Sep 17 00:00:00 2001 From: Alvaro Laserna Date: Thu, 18 Jul 2024 13:55:19 +0300 Subject: [PATCH 2/2] remove debugging print --- testui/elements/testui_element.py | 1 - 1 file changed, 1 deletion(-) diff --git a/testui/elements/testui_element.py b/testui/elements/testui_element.py index 5c15b2d..6486cd9 100644 --- a/testui/elements/testui_element.py +++ b/testui/elements/testui_element.py @@ -495,7 +495,6 @@ def click(self): return self except Exception as error: err = error - print(error) time.sleep(0.2) return self.__show_error( f"{logger.bcolors.FAIL}{err} {self.device_name}: Element "