drag_time = 1.0
start_time = 2
- def __init__(self, idx):
+ def __init__(self, idx, offset):
super().__init__()
info('test idx: %s' % idx)
+ self._offset = offset
sleep(5)
address = ('localhost', 6000)
self._conn = Client(address)
def __mouse_click(self, pos, btn):
offset_x = int((1920 - 1360) / 2) + 1 # xfce decorations
- offset_y = int((1080 - 768) / 2) + 24 # xfce decorations
+ offset_y = int((1080 - 768) / 2) + 24 + self._offset # xfce decorations
btn = 3 if btn == 'right' else 1
system('xdotool mousemove %s %s' % (offset_x + pos[0], offset_y + pos[1]))
def click(task):
def __mouse_drag(self, start, end, btn):
offset_x = int((1920 - 1360) / 2) + 1 # xfce decorations
- offset_y = int((1080 - 768) / 2) + 24 # xfce decorations
+ offset_y = int((1080 - 768) / 2) + 24 + self._offset # xfce decorations
btn = 3 if btn == 'right' else 1
system('xdotool mousemove %s %s' % (offset_x + start[0], offset_y + start[1]))
def mousedown(task):
def __init__(self):
ShowBase.__init__(self)
- fun_test = FunctionalTest(int(argv[1]))
+ offset = int(argv[2]) if len(argv) >= 3 else 0
+ fun_test = FunctionalTest(int(argv[1]), offset)
TestApp().run()