diff --git a/tutorials/tutorial_hexagoncontrol.py b/tutorials/tutorial_hexagoncontrol.py index 5cd059a1..ae0dd98f 100644 --- a/tutorials/tutorial_hexagoncontrol.py +++ b/tutorials/tutorial_hexagoncontrol.py @@ -140,18 +140,38 @@ def automate_hexagoncontrol(): # Relocating Tableview by performing operations on table view try: + # ToDo we should introduce aq key e.g. CTRL+S for all Widgets to open Select To Open Control x, y = pag.locateCenterOnScreen(f'{wms_path}selecttoopencontrol.png') pag.moveTo(x + 250, y - 462, duration=1) if platform == 'linux' or platform == 'linux2': - pag.dragRel(649, 700, duration=3) + pag.dragRel(280, 487, duration=3) elif platform == 'win32' or platform == 'darwin': pag.dragRel(200, 487, duration=2) + # Opening Hexagon Control dockwidget + if tv_x is not None and tv_y is not None: + pag.moveTo(tv_x - 250, tv_y + 462, duration=2) + pag.click(duration=2) + pag.sleep(1) + pag.press('down') + pag.sleep(1) + pag.press(enter) + pag.sleep(2) pag.sleep(2) + x, y = pag.locateCenterOnScreen(f'{wms_path}selecttoopencontrol.png') + pag.click(x, y, duration=1) + pag.press('up') + pag.press(enter) if platform == 'linux' or platform == 'linux2': + # ToDo introduce favicons for major views based on the MSS icon, e.g. add a small table to the icon + # This can be selected easier by program and user + # Perhaps we could also have a feature in the main control to arrange alls open views on the screen pag.keyDown('altleft') pag.press('tab') - pag.press('right') + pag.keyUp('tab') + pag.press('tab') + pag.keyUp('tab') pag.keyUp('altleft') + elif platform == 'win32': pag.keyDown('alt') pag.press('tab') @@ -172,15 +192,7 @@ def automate_hexagoncontrol(): except (ImageNotFoundException, OSError, TypeError, Exception): print("\nException : TableView's Select to open Control option not found on the screen.") - # Opening Hexagon Control dockwidget - if tv_x is not None and tv_y is not None: - pag.moveTo(tv_x - 250, tv_y + 462, duration=2) - pag.click(duration=2) - pag.sleep(1) - pag.press('down') - pag.sleep(1) - pag.press(enter) - pag.sleep(2) + # Entering Centre Latitude and Centre Longitude of Delhi around which hexagon will be drawn try: