Пример #1
0
def main():
    if len(sys.argv) > 1:
        scriptfirstname = sys.argv[1].strip()
        settings = Settings()
        sf = ScriptFiles("../scripts")
        sf.runscriptbyfirstname(scriptfirstname, settings)
    else:
        # test1()
        # test2()
        # test3()
        # test4()
        # test5()
        test6()
Пример #2
0
def test5():
    # nonfunctional test
    # login
    settings = Settings()
    sf = ScriptFiles("../scripts")
    print "starting in the background..."
    sf.runscriptbyfirstname("startcgoban", settings)
    print "started? alt tab now"
    auto = Automation(settings)
    auto.alttab()
    print "sending a click"
    emu = auto.getemu()
    emu.move(100, 500)
    emu.click()
    auto.close()
Пример #3
0
def test6():
    settings = Settings()
    sf = ScriptFiles("../scripts")
    print "Starting Cgoban..."
    sf.runscriptbyfirstname("startcgoban_xvfb", settings)
    sf.runscriptbyfirstname("login", settings)
    sf.runscriptbyfirstname("killxvfb", settings)
Пример #4
0
def test4():
    # TODO An environment variable for where to look for files
    settings = Settings()
    sf = ScriptFiles("../scripts")
    sf.runscriptbyfirstname("startcgoban", settings)
Пример #5
0
def test2():
    sf = ScriptFiles("../scripts")
    sf.runscriptbyfirstname("helloworlds", Settings())