modify autotest.py for use mac app.

modify autotest.py for use mac app.