chore: click check boxes specifically, other elements in the middle

This commit is contained in:
Anastasiya Semenkevich 2024-06-13 12:53:49 +03:00 committed by Anastasiya
parent 5508cd96c9
commit 3b4a50b46f
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ class CheckBox(QObject):
@allure.step("Set {0} value: {1}")
def set(self, value: bool):
if self.is_checked is not value:
self.click()
self.click(x=5, y=5)
assert driver.waitFor(
lambda: self.is_checked is value, configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Value not changed'
LOG.info('%s: value changed to "%s"', self, value)

View File

@ -96,8 +96,8 @@ class QObject:
):
driver.mouseClick(
self.object,
x or int(self.object.width * 0.1),
y or int(self.object.height * 0.1),
x or int(self.object.width * 0.5),
y or int(self.object.height * 0.5),
button or driver.Qt.LeftButton
)
LOG.info('%s: is clicked with Qt.LeftButton', self)