File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212- Add `TITLE ` replacement, to apply Python's title() function. Example: [TITLE:the title]
1313- Add `ROUND ` replacement, float number to a string with the indicated number of decimals. Example: [ROUND:3.3333::2]
1414- Remove accents from generated file names to avoid errors in some filesystems
15+ - Update Appium-Python-Client requirement to enable 3 and 4 versions
16+ - Deprecate set_text method in InputText class to make it compatible with Appium-Python-Client 3 and 4
1517
1618v3.2.0
1719------
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ The main dependencies are:
3030 in Android or iOS devices/emulators.
3131- `requests <http://docs.python-requests.org >`_: to test APIs
3232
33+ You might need to adjust the Selenium and Appium-Python-Client versions in your project.
34+ In that case follow the `compatibility matrix <https://github.com/appium/python-client?tab=readme-ov-file#compatibility-matrix >`_
35+
3336**Using toolium-template **
3437
3538The easiest way of getting started is to clone `toolium-template <https://github.com/Telefonica/toolium-template >`_
Original file line number Diff line number Diff line change 1- requests ~= 2.27 # api tests
2- selenium ~= 4.0 # web tests
3- Appium-Python-Client ~ =2.3 # mobile tests
4- Pillow ~= 10.1 # visual testing
1+ requests ~= 2.27 # api tests
2+ selenium ~= 4.0 # web tests
3+ Appium-Python-Client > =2.3 , < 5.0 # mobile tests
4+ Pillow ~= 10.1 # visual testing
55screeninfo ~= 0.8
66lxml ~= 5.1
77Faker ~= 25.9
Original file line number Diff line number Diff line change @@ -26,22 +26,18 @@ def text(self):
2626
2727 :returns: element text value
2828 """
29- if self .driver_wrapper .is_web_test () or self .webview :
30- return self .web_element .get_attribute ("value" )
31- elif self .driver_wrapper .is_ios_test ():
32- return self .web_element .get_attribute ("label" )
33- elif self .driver_wrapper .is_android_test ():
29+ if self .driver_wrapper .is_android_test () and not self .webview :
3430 return self .web_element .get_attribute ("text" )
31+ else :
32+ return self .web_element .get_attribute ("value" )
3533
3634 @text .setter
3735 def text (self , value ):
3836 """Set value on the element
3937
4038 :param value: value to be set
4139 """
42- if self .driver_wrapper .is_ios_test () and not self .driver_wrapper .is_web_test ():
43- self .web_element .set_value (value )
44- elif self .shadowroot :
40+ if self .shadowroot :
4541 value = value .replace ("\" " , "\\ \" " )
4642 self .driver .execute_script ('return document.querySelector("%s")'
4743 '.shadowRoot.querySelector("%s")'
Original file line number Diff line number Diff line change @@ -105,9 +105,11 @@ def test_get_text(driver_wrapper):
105105
106106def test_get_input_text (driver_wrapper ):
107107 driver_wrapper .driver .find_element .return_value = mock_element
108+ driver_wrapper .is_android_test = mock .MagicMock (return_value = False )
108109
109110 username_value = LoginPageObject ().username .text
110111
112+ mock_element .get_attribute .assert_called_once_with ('value' )
111113 assert username_value == 'input text value'
112114
113115
You can’t perform that action at this time.
0 commit comments