mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
Jakub Sokołowski
920b54e94c
Related to: https://github.com/status-im/desktop-qa-automation/pull/352 Signed-off-by: Jakub Sokołowski <jakub@status.im>
26 lines
607 B
Python
26 lines
607 B
Python
import logging
|
|
import typing
|
|
|
|
import allure
|
|
|
|
import driver
|
|
from gui.elements.object import QObject
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
|
class Button(QObject):
|
|
|
|
@allure.step('Click {0}')
|
|
def click(
|
|
self,
|
|
x: typing.Union[int, driver.UiTypes.ScreenPoint] = None,
|
|
y: typing.Union[int, driver.UiTypes.ScreenPoint] = None,
|
|
button: driver.MouseButton = None
|
|
):
|
|
if None not in (x, y, button):
|
|
getattr(self.object, 'clicked')()
|
|
LOG.info('%s: clicked', self)
|
|
else:
|
|
super(Button, self).click(x, y, button)
|