(self, x=-1, y=-1, selector=None)
| 4147 | self.device.touch(x, y) |
| 4148 | |
| 4149 | def longTouch(self, x=-1, y=-1, selector=None): |
| 4150 | if self.uiAutomatorHelper: |
| 4151 | if selector: |
| 4152 | if DEBUG_UI_AUTOMATOR_HELPER: |
| 4153 | print("ViewClient: Long-touching View by selector=%s through UiAutomatorHelper" % (selector), |
| 4154 | file=sys.stderr) |
| 4155 | oid_ref = self.uiAutomatorHelper.ui_device.find_object(by_selector=selector) |
| 4156 | self.uiAutomatorHelper.ui_object2.long_click(oid=oid_ref.oid) |
| 4157 | else: |
| 4158 | if DEBUG_UI_AUTOMATOR_HELPER: |
| 4159 | print("ViewClient: Long-touching (%d, %d) through UiAutomatorHelper" % (x, y), file=sys.stderr) |
| 4160 | self.uiAutomatorHelper.ui_device.swipe(start_x=int(x), start_y=int(y), end_x=int(x), end_y=int(y), |
| 4161 | steps=400) |
| 4162 | else: |
| 4163 | self.device.longTouch(x, y) |
| 4164 | |
| 4165 | def swipe(self, startX=-1, startY=-1, endX=-1, endY=-1, steps=400, segments=None, segmentSteps=5, start=None, |
| 4166 | end=None): |
nothing calls this directly
no test coverage detected