i'm trying pyautogui's locateonscreen work on virtual machine, can run multiple tests @ once. hoping there's setting in virtual box i'm missing might resolve this. here's code:
import pyautogui import win32com.client autoit = win32com.client.dispatch("autoitx3.control") autoit.run(application_path) open_application = autoit.winwait("title_of_app", "", 10) header_logo = pyautogui.locateonscreen("header_logo.png", 10) if open_application == 1 , header_logo not none: print "detected application window." else: if open_application == 0: print "failed detect application window." assert open_application else: print "failed detect logo in header of application window." assert header_logo
outside of vm passes, , inside run "failed detect logo in header of application window". i've tried tweaking image lot , nothing take. main desktop windows 7 64-bit , vm window 7 32-bit. there way work on virtualbox or vm software?
edit: should add autoit's winwait returns 1 or 0 , pyautogui's locateonscreen returns none or coordinates of image located on screen , size of image used.
Comments
Post a Comment