def test_search(self):
        # 运行网易云音乐
        autoit.run(self.cloudmusic_path)
        time.sleep(5)

        # 等待网易云音乐窗口激活
        autoit.win_wait_active(self.cloudmusic_title)

        # 按5下TAB切换至搜索框
        autoit.send("{TAB 5}")

        # 搜索歌曲
        autoit.send(self.song)
        time.sleep(1)

        # 按3下向下键选择第一首歌曲
        autoit.send("{DOWN 3}")
        time.sleep(1)

        # 按回车键播放歌曲
        autoit.send("{ENTER}")
        time.sleep(1)

        # 校验当前窗口标题是否含有搜索歌曲名
        title = autoit.win_get_title(self.cloudmusic_title)
        assert self.song in title, self.song.encode('utf-8') + ' not in ' + title.encode('utf-8')

        # 关闭窗口
        autoit.win_close(self.cloudmusic_title)
Exemplo n.º 2
0
    def test_search(self):
        # 运行红叮当客户端
        autoit.run(self.cloudmusic_path)
        time.sleep(5)

        # 等待红叮当窗口激活
        autoit.win_wait_active(self.cloudmusic_title)

        # 按1下TAB切换至输入框
        autoit.send("{TAB 1}")

        # 输入用户名
        autoit.send(self.user)
        time.sleep(2)

        # 按1下TAB切换至输入框
        autoit.send("{TAB 1}")

        # 输入密码
        autoit.send(self.passwd)
        time.sleep(2)

        # 按1下TAB切换至输入框
        autoit.send("{TAB 1}")

        # 点击登录
        autoit.send("{ENTER}")
        time.sleep(2)

        # # 校验当前窗口标题是否含有搜索歌曲名
        # title = autoit.win_get_title(self.cloudmusic_title)
        # assert self.song in title, self.song.encode('utf-8') + ' not in ' + title.encode('utf-8')

        # # 关闭窗口
        # autoit.win_close(self.cloudmusic_title)
Exemplo n.º 3
0
    def test_CDR(self):
        homepage = Homepage(self.driver)
        homepage.navigate()
        signup_form = homepage.getSignupForm()
        signup_form.setName("admin", "brijesh84")

        autoit.run("C:\Program Files (x86)\Zoiper\Zoiper.exe")
        autoit.win_wait_active("Zoiper", 5)
        autoit.control_send("Zoiper", "Edit1", "121919898222221")
        time.sleep(5)
        autoit.send("{ENTER}")

        time.sleep(60)

        time.sleep(5)
        self.driver.find_element_by_css_selector(
            "li.monitoring > a > div.menu_name").click()
        time.sleep(5)
        self.driver.find_element_by_link_text("CDR Trace").click()
        time.sleep(3)
        self.driver.find_element_by_id("rdoCdrSearchType-1").click()
        self.driver.find_element_by_id("txtCustomerIPAddress").send_keys(
            "192.168.20.155")
        self.driver.find_element_by_id("cdrtracesearch").click()
        time.sleep(5)
        temp = "CDR_Print"
        self.driver.save_screenshot("%s.png" % (temp))
Exemplo n.º 4
0
def Estorno(Num):
    autoit.send('Entra Função Estorno')
    FuncoesBD.LocalizaCupom(Num)
    if Variaveis.Retorna == 'S':
        autoit.send("{ALTDOWN}x{ALTUP}")
        SENHAFUNC.SENHAFUNC()
        try:
            log.EscreverLog('Estorno de Venda')
            autoit.win_wait_active("[Class:TFRM_ESTORNO]", Variaveis.TTela)
            autoit.control_send("[CLASS:TFRM_ESTORNO]", "TRzNumericEdit1",
                                str(Variaveis.LocCupom))
            time.sleep(Variaveis.TDig)
            autoit.control_click("[CLASS:TFRM_ESTORNO]", "TRzBitBtn2")
            time.sleep(Variaveis.TDig)
            autoit.control_click("[CLASS:TFRM_ESTORNO]", "TVSMDBGrid1")
            time.sleep(Variaveis.TDig)
            autoit.send("{SPACE}")
            time.sleep(Variaveis.TDig)
            autoit.control_click("[CLASS:TFRM_ESTORNO]", "TRzBitBtn1")
            time.sleep(Variaveis.TAlertaB)
            autoit.send("{ENTER}")
            time.sleep(Variaveis.TAlertaB)
            autoit.send("{ENTER}")
        except:
            log.EscreverLog('Erro')
    else:
        log.EscreverLog('Cupom não encontrado')
    log.EscreverLog('Sai Função Estorno')
Exemplo n.º 5
0
    def Install_CQI(self):
        autoit.auto_it_set_option("MouseClickDelay", 1000)
        autoit.run(
            "D:\CareFusion\CQI 4.3\Release\Guardrails CQI - Setup-4.3.exe")

        window_name = "[Class:MsiDialogCloseClass]"
        autoit.win_wait_active(window_name, 30)

        autoit.control_wait_visible(window_name, "[ID:2271]", 30)
        autoit.control_click_wait(window_name, "[ID:2271]",
                                  20)  # Welcome screen - Next

        autoit.control_click_wait(window_name, "[ID:2172]",
                                  20)  # License screen - Accept Rad Button
        autoit.control_wait_enabled(
            window_name, "[ID:2271]",
            30)  # Wait till Next Button is enabled after accepting
        autoit.control_click(window_name, "[ID:2271]")  # License screen - Next

        autoit.control_wait_enabled(window_name, "[ID:2271]",
                                    30)  # Language screen - Next
        autoit.control_wait_visible(window_name, "[ID:2271]", 30)
        autoit.control_click(window_name,
                             "[ID:2271]")  # Language screen - Next

        autoit.control_wait_visible(window_name, "[ID:2271]",
                                    30)  # SetupType screen - Next
        autoit.control_custom_sleep(
            2000)  # Sometimes the event is missed. Needs a delay first.
        autoit.control_click_wait(window_name, "[ID:2271]",
                                  10)  # SetupType screen - Next
Exemplo n.º 6
0
    def Crtx(self):
        log.EscreverLog('Função CRTX')
        log.EscreverLog('ESC')
        autoit.send("{ESC}")
        log.EscreverLog('Timer ' + str(Variaveis.TDig))
        time.sleep(Variaveis.TDig)

        log.EscreverLog('ESC')
        autoit.send("{ESC}")
        log.EscreverLog('Timer ' + str(Variaveis.TDig))
        time.sleep(Variaveis.TDig)

        log.EscreverLog('Limpa Tela')
        autoit.send("{CTRLDOWN}x{CTRLUP}")
        log.EscreverLog('Timer ' + str(Variaveis.TDig))
        time.sleep(Variaveis.TDig)
        try:
            log.EscreverLog('Tempo.do alerta sem Produto ' + 'Timer ' +
                            str(Variaveis.TTela))
            autoit.win_wait_active("[Class:TFRM_VSMTASKDIALOG]",
                                   Variaveis.TTela)
            log.EscreverLog('Botão Ok')

            autoit.control_click("[Class:TFRM_VSMTASKDIALOG]", "TRzBitBtn1")
            log.EscreverLog('Clicou Ok')
            log.EscreverLog('Timer ' + str(Variaveis.TDig))
            time.sleep(Variaveis.TDig)
        except:
            log.EscreverLog('Não teve Alerta, Limpando tela')

        log.EscreverLog('Enter')
        autoit.send("{ENTER}")
        log.EscreverLog('Timer ' + str(Variaveis.TEnterR))
        time.sleep(Variaveis.TEnter)
        log.EscreverLog('Sai Função CRTX')
Exemplo n.º 7
0
def extract_rr(filename):
    pid = autoit.run("C:/Program Files/Kubios/Kubios HRV Standard/kubioshrv.exe")
    
    # wait until screen is loaded
    assert autoit.win_wait_active(f"[TITLE:{kubios_title}]", 30)
    time.sleep(0.25)
    
    # get position and click menu->open
    x, y, _, _ = autoit.win_get_pos(f"[TITLE:{kubios_title}]")
    assert autoit.mouse_click(x=x+20, y=y+50, speed=10)
    time.sleep(0.5)
    assert autoit.mouse_click(x=x+20, y=y+70, speed=10)
    
    # wait for loading of file input screen
    assert autoit.win_wait_active(f"[TITLE:{title_open}]", 30)
    time.sleep(0.25)
    assert autoit.control_send(f"[TITLE:{title_open}]", "[CLASS:Edit]", filename)
    time.sleep(0.25)
    assert autoit.control_click(f"[TITLE:{title_open}]", "[CLASS:Button; INSTANCE:1]")
    time.sleep(1)
    
    # check if there was an error (if Open Data File is still there)
    assert not autoit.win_active(f"[TITLE:{title_open}]"), 'Failed to load!'
    
    assert os.system(f"taskkill /PID {pid} /F")==0
Exemplo n.º 8
0
def InformarLote(Qtd):
    time.sleep(Variaveis.TEnter)
    log.EscreverLog('Informar Lote')
    autoit.send("{CTRLDOWN}l{CTRLUP}")
    time.sleep(Variaveis.TDig)
    autoit.win_wait_active("[Class:TFRM_OBRIGAITENSLOTE]", Variaveis.TTelaL)
    time.sleep(Variaveis.TDig)
    time.sleep(Variaveis.TEnter)
    autoit.control_click("[Class:TFRM_OBRIGAITENSLOTE]", "TVSMColorButton1")
    time.sleep(Variaveis.TEnter)
    log.EscreverLog('Selecionar Lote')
    time.sleep(Variaveis.TDig)
    autoit.win_wait_active("[Class:TFRM_ITENSLOTE]", Variaveis.TTelaL)
    time.sleep(Variaveis.TDig)
    autoit.send(Qtd)
    time.sleep(Variaveis.TEnter)
    autoit.send("{ENTER}")
    time.sleep(Variaveis.TEnter)
    time.sleep(Variaveis.TDig)
    autoit.control_click("[Class:TFRM_ITENSLOTE]", "TVSMColorButton1")
    time.sleep(Variaveis.TEnter)
    time.sleep(Variaveis.TDig)
    autoit.send("{ENTER}")
    time.sleep(Variaveis.TEnter)
    time.sleep(Variaveis.TFinal)
Exemplo n.º 9
0
    def test_search(self):
        # 运行网易云音乐
        autoit.run(self.cloudmusic_path)
        time.sleep(5)

        # 等待网易云音乐窗口激活
        autoit.win_wait_active(self.cloudmusic_title)

        # 按5下TAB切换至搜索框
        autoit.send("{TAB 5}")

        # 搜索歌曲
        autoit.send(self.song)
        time.sleep(1)

        # 按3下向下键选择第一首歌曲
        autoit.send("{DOWN 3}")
        time.sleep(1)

        # 按回车键播放歌曲
        autoit.send("{ENTER}")
        time.sleep(1)

        # 校验当前窗口标题是否含有搜索歌曲名
        title = autoit.win_get_title(self.cloudmusic_title)
        assert self.song in title, self.song.encode('utf-8') + ' not in ' + title.encode('utf-8')
Exemplo n.º 10
0
def PedeCPF():
    sSql = "SELECT COALESCE(CF.STATUS,'S') " \
           "FROM myouro.LOJAS L " \
           "INNER JOIN myouro.CIDADES C ON C.CODCID = L.CODCID " \
           "LEFT JOIN myouro.CONFIGURACAO CF ON CF.CHAVE = CONCAT(C.UFCID,'_PEDECPF') " \
           "WHERE L.CODLOJA  = %s " % (Variaveis.CodLoja)

    log.EscreverLog('Executando Sql:' + str(sSql))
    Resultado = FuncoesBD.ComDBSlave.Select(str(sSql))

    if Resultado.__len__() > 0:
        Result = Resultado[0]
        Variaveis.PedeCpf = str(Result[0])

    if Variaveis.PedeCpf == 'S':
        log.EscreverLog("Função Pede CPF")
        try:
            Tempo.TeclaAcao()
            autoit.win_wait_active("[Class:TFRM_VENDACPF]", Variaveis.Tempo)
            log.EscreverLog("Pede CPF")
            autoit.control_click("[Class:TFRM_VENDACPF]", "TVSMColorButton3")
            log.EscreverLog("Fecha Pede CPF")
        except:
            log.EscreverLog('Não pediu CPF')
    if Variaveis.PedeCpf == 'N':
        log.EscreverLog('Não pediu CPF')
        Tecla.TempoM()
Exemplo n.º 11
0
    def post_pic(self):
        login_slct = '//*[@id="react-root"]/section/main/article/div/div/div/div[2]/button'
        username = '******'
        password = '******'
        login_btn = '//*[@id="loginForm"]/div[1]/div[6]/button'
        not_now = '//*[@id="react-root"]/section/main/div/div/div/button'
        post_btn = '//*[@id="react-root"]/section/nav[2]/div/div/div[2]/div/div/div[3]'
        next_btn = '//*[@id="react-root"]/section/div[1]/header/div/div[2]/button'
        caption_path = '//*[@id="react-root"]/section/div[2]/section[1]/div[1]/textarea'
        share_btn = '//*[@id="react-root"]/section/div[1]/header/div/div[2]/button'
        image_path = conf.IMAGE_PATH
        caption = conf.CAPTION

        mob_bot = self.open_mob_browser()
        mob_bot.wait_for(login_slct).click()
        mob_bot.wait_for(username).send_keys(self.username)
        mob_bot.wait_for(password).send_keys(self.password)
        mob_bot.wait_for(login_btn).click()
        try:
            mob_bot.wait_for(not_now).click()
        except:
            pass
        mob_bot.wait_for(post_btn).click()
        autoit.win_wait_active("Open", 5)
        autoit.send(os.getcwd() + image_path)
        autoit.send("{ENTER}")

        mob_bot.wait_for(next_btn).click()
        self.random_wait(5)
        mob_bot.wait_for(caption_path).send_keys(caption)
        mob_bot.wait_for(share_btn).click()
        sleep(10)
        mob_bot.browser.quit()
Exemplo n.º 12
0
def SENHAFUNC():
    try:
        log.EscreverLog('Entra Função SenhaFunc')
        try:
            Variaveis.Tempo = (0.25)
            log.EscreverLog('Tempo. ate ' + str(Variaveis.Tempo) + ' segundos')
            autoit.win_wait_active("[Class:TFRM_SENHAFUNC]", Variaveis.Tempo)
            Tela.Alerta('Acima do limite', 'Desconto aceito')
            log.EscreverLog('Pede Senha')
            Tempo.Dig()
            autoit.control_set_text("[Class:TFRM_SENHAFUNC]", "TRzButtonEdit1",
                                    Variaveis.SenhaAdmin)
            log.EscreverLog('Passa Senha')
            Tecla.Enter()
            log.EscreverLog('Senha Ok')
        except:
            Tecla.Enter()
            Variaveis.Tempo = (0.25)
            log.EscreverLog('Tempo. ate ' + str(Variaveis.Tempo) + ' segundos')
            autoit.win_wait_active("[Class:TFRM_SENHAFUNC]", Variaveis.Tempo)
            log.EscreverLog('Pede Senha')
            Tecla.TempoR()
            autoit.control_set_text("[Class:TFRM_SENHAFUNC]", "TRzButtonEdit1",
                                    Variaveis.SenhaAdmin)
            log.EscreverLog('Passa Senha')
            Tecla.Enter()
            log.EscreverLog('Senha Ok')
    except:
        log.EscreverLog('Sem Senha')
    log.EscreverLog('Sai Função SenhaFunc')
Exemplo n.º 13
0
def Desconto(Desc, Arred):
    log.EscreverLog('Função Desconto')
    Tecla.TempoR()
    autoit.control_click("[Class:TFRM_FINALVENDA]", "TRzNumericEdit4")
    Tecla.TempoR()
    log.EscreverLog('Desconto de: ' + str(Desc) + '%')
    autoit.control_set_text("[Class:TFRM_FINALVENDA]", "TRzNumericEdit4", Desc)

    Tecla.Enter()

    SENHAFUNC.SENHAFUNC()

    autoit.control_click("[Class:TFRM_FINALVENDA]", "TRzNumericEdit3")
    Tecla.TempoR()
    log.EscreverLog('Arredondamento de: ' + str(Arred) + 'R$')
    autoit.control_set_text("[Class:TFRM_FINALVENDA]", "TRzNumericEdit3",
                            Arred)

    Tecla.Enter()
    try:
        log.EscreverLog('Alerta de Arredondamento')
        autoit.win_wait_active("[Class:TFRM_VSMTASKDIALOG]", Variaveis.TTela)
        Tecla.TempoR()
        autoit.control_click("[Class:TFRM_VSMTASKDIALOG]", "TRzBitBtn1")
        Tecla.TempoR()
        log.EscreverLog('Botão ok')
        log.EscreverLog('Clicou ok')
    except:
        log.EscreverLog('Não teve alerta de Arredondamento')
Exemplo n.º 14
0
def LancamentoVenda():
    log.EscreverLog('Tela de Lançamento de Vendas')
    try:
        Variaveis.Tempo = (Variaveis.TempoAdd + 10)
        log.EscreverLog('Tempo. ate ' + str(Variaveis.Tempo) + ' segundos')
        autoit.win_wait_active("[Class:TFRM_VENDAS]", Variaveis.Tempo)
    except:
        Tempo.TeclaAcao()
Exemplo n.º 15
0
def add_data_shp():    #加载矢量数据shp格式
    autoit.mouse_click("left",120,92,1)                                #点击加载矢量数据
    autoit.win_wait_active(u"打开矢量文件",15)
    autoit.control_set_text(u"打开矢量文件","Edit1",r"C:\Users\admin\Desktop\PIEDATA\Lambert_SHP\beijing.shp")
    autoit.control_click(u"打开矢量文件","Button1")                    #选择好文件,点击打开
    autoit.win_wait_active(u"提示",5)                                  #不同坐标系,提示是否新建图层
    autoit.control_click(u"提示","Button2")                            #新建图层
    sleep(5)
Exemplo n.º 16
0
 def version_upgrade(self,upgradefile):
     self.click_Tools()
     self.click_Upgrade()
     self.click_SelectFilesUpgrade()
     autoit.win_wait_active("[Title:Add Batch]", 10)  # 等待页面响应
     self.set_Upgrade_path(upgradefile)
     self.click_Upgrade_confirm()
     self.click_UpgradeUpgrade()
     time.sleep(50)#等待文件上传
Exemplo n.º 17
0
def Validacao():
    try:
        Variaveis.Tempo = (Variaveis.TempoAdd + 0.05)
        log.EscreverLog('Tempo. ate ' + str(Variaveis.Tempo) + ' segundos')
        autoit.win_wait_active("[Class:TfrmMostraMensagens]", Variaveis.Tempo)
        log.EscreverLog("Messagem de Validação")
        Tecla.Esc()
    except:
        log.EscreverLog("Sem Alerta")
Exemplo n.º 18
0
        def runQueue(s):
            '''Runs VPP for all yachts currently queued'''

            s.__openWinDes()
            autoit.win_wait_active("WinDesign4")
            for yacht in s.q[:]:
                r = s.__runYacht(yacht)
                s.__saveYacht(yacht, r)
                s.q.remove(yacht)
Exemplo n.º 19
0
def add_data_jpg():  #加载栅格数据jpg格式
    '''添加数据方法一:设置焦点进行传参,添加jpg数据'''
    autoit.mouse_click("left",54,92,1)                                     #点击加载栅格数据
    autoit.win_wait_active(u"打开栅格文件",15)                              #等待窗口活跃,15秒超时
    autoit.control_focus(u"打开栅格文件", "[Class:Edit; instance:1]")       #设置焦点
    autoit.control_set_text(u"打开栅格文件", "[Class:Edit; instance:1]","C:\Users\Administrator\Desktop\GF1.jpg")
    # 输入文本
    autoit.control_click(u"打开栅格文件", "Button1")
    sleep(5)
Exemplo n.º 20
0
def open_euop_175():
    subprocess.call(Firefox +
                    " -no-remote -profile firefox_profile/euop_175 " +
                    EUOP_175_URL)
    autoit.win_wait_active("管理员登录 - Mozilla Firefox", 15)
    time.sleep(3)
    autoit.send("{TAB}")
    autoit.send(EUOP_175_USERNAME)
    autoit.send("{TAB}")
    autoit.send(EUOP_175_MOBILE)
Exemplo n.º 21
0
def insert_credentials(mydriver, lastpos, lastsize):
    mydriver.maximize_window()
    print("Login efetuado com sucesso...")
    autoit.win_wait_active("", 3)
    autoit.send(user + "{TAB}")
    autoit.send(password + "{ENTER}")
    driver.set_window_rect(lastpos["x"], lastpos["y"], lastsize["width"],
                           lastsize["height"])

    return False
Exemplo n.º 22
0
def right_control():  # 图层右键功能
    autoit.mouse_click("Right", 93, 193, 1, 10)  # 右键点击图层,打开功能列表
    sleep(1)
    autoit.send("{down 10}")  # 选择第十行,选择属性
    sleep(1)
    autoit.send("{enter}")
    autoit.win_wait_active(u"图层属性", 5)  # 等待图层属性窗口,5秒超时
    sleep(1)
    autoit.control_click(u"图层属性", "Button2")  # 关闭图层属性
    sleep(1)
Exemplo n.º 23
0
 def add_img(self,id):
     self.click_Tools() # 点击tools
     self.click_AddBaseLibrary()  # 点击add base library
     autoit.win_wait_active("[Title:Add Base Library]", 5)  # 等待页面响应
     self.set_add_path()
     self.click_add_confirm()
     self.send(id)
     self.click_GetImageID_OK()
     time.sleep(1)
     self.click_ok()
Exemplo n.º 24
0
def Autorizando():
    log.EscreverLog('Atorizando Venda')
    try:
        Variaveis.Tempo = (Variaveis.TempoAddFinalVenda + 10)
        log.EscreverLog('Tempo. ate ' + str(Variaveis.Tempo) + ' segundos')
        autoit.win_wait_active("[Class:TFRM_FINALVENDA.pnlStatusForm]",
                               Variaveis.Tempo)
        Tempo.TelaFinalVenda()
    except:
        Tempo.TelaFinalVenda()
Exemplo n.º 25
0
def open_pomp_res():
    subprocess.call(Firefox +
                    " -no-remote -profile firefox_profile/pomp_res  " +
                    POMP_RES_URL)
    autoit.win_wait_active("管理员登录 - Mozilla Firefox", 15)
    time.sleep(3)
    autoit.send("{TAB}")
    autoit.send(POMP_RES_USERNAME)
    autoit.send("{TAB}")
    autoit.send(POMP_RES_MOBILE)
Exemplo n.º 26
0
def ComprovanteDANFe():
    log.EscreverLog('Comprovante DANFe')
    try:
        Variaveis.Tempo = (Variaveis.TempoAdd + 5)
        log.EscreverLog('Tempo. ate ' + str(Variaveis.Tempo) + ' segundos')
        autoit.win_wait_active("[Class:TFRM_TELACOMPROVANTE]", Variaveis.Tempo)
        log.EscreverLog('Comprovante DANFe')
        Tecla.Esc()
        log.EscreverLog('Fecha Comprovante')
    except:
        log.EscreverLog('Sem Impressao')
Exemplo n.º 27
0
def AlertaRejeicao():
    log.EscreverLog('Tela de Alerta')
    try:
        Variaveis.Tempo = (Variaveis.TempoAddFinalVenda + 5)
        log.EscreverLog('Tempo ate ' + str(Variaveis.Tempo) + ' segundos')
        autoit.win_wait_active("[Class:TFRM_VSMTASKDIALOG]", Variaveis.Tempo)
        Tempo.EnterProduto()
        autoit.control_click("[Class:TFRM_VSMTASKDIALOG]", "TVSMColorButton1")
        log.EscreverLog('Clicou Ok')
    except:
        Tempo.EnterProduto()
Exemplo n.º 28
0
 def install_jenkins(self):
     autoit.auto_it_set_option("MouseClickDelay", 1000)
     autoit.run(
         "msiexec /package D:\Automation\Projects\WhiteRide\Repo\jenkins.msi"
     )
     autoit.win_wait_active("Jenkins 1.651.2 Setup", 30)
     autoit.control_click_wait("Jenkins 1.651.2 Setup", "[ID:995]", 10)
     autoit.control_click_wait("Jenkins 1.651.2 Setup", "[ID:1100]", 10)
     autoit.control_click_wait("Jenkins 1.651.2 Setup", "[ID:1071]", 60)
     autoit.control_click_wait("Jenkins 1.651.2 Setup", "[ID:968]", 20)
     autoit.control_click_wait("Jenkins 1.651.2 Setup", "[ID:971]", 120)
Exemplo n.º 29
0
def TelaAlerta(t, e):
    try:
        Variaveis.Tempo = (5)
        autoit.win_wait_active("[Class:TFRM_VSMTASKDIALOG]", Variaveis.Tempo)
        Tempo.Click()
        log.EscreverLog(str(t))
        autoit.control_click("[Class:TFRM_VSMTASKDIALOG]", "TVSMColorButton1")
        log.EscreverLog('Clicou Ok')
    except:
        log.EscreverLog(str(e))
    Tempo.TeclaAcao()
Exemplo n.º 30
0
 def open_xcap(self):
     xcap = "C:\\Program Files\\EPIX\\XCAP"
     xcap += "\\program\\xcapwxx.exe -Xmx128M -myjava"
     autoit.run(xcap, "C:\\Users\\Public\\Documents\\EPIX\\XCAP")
     autoit.win_wait_active("EPIX")
     autoit.send("{TAB}")
     sleep(0.05)
     autoit.send("{ENTER}")
     sleep(0.05)
     autoit.win_wait_active("View #")
     autoit.win_activate(self._gui_title)
Exemplo n.º 31
0
def add_data_tif():  # 加载栅格数据Tif格式,此格式是否需要建立金字塔
    '''添加数据方法二:直接使用control_set_text传参,添加tif数据是否建立金字塔'''
    autoit.mouse_click("left", 50, 92, 1)  # 点击加载栅格数据
    autoit.win_wait_active(u"打开栅格文件", 15)
    autoit.control_set_text(u"打开栅格文件", "Edit1",
                            r"C:\Users\admin\Desktop\PIEDATA\GF1.tiff")
    autoit.control_click(u"打开栅格文件", "Button1")  # 确定打开文件
    autoit.win_wait_active(u"建立金字塔", 5)  # 等待是否建立金字塔窗口
    autoit.control_click(u"建立金字塔", "Button3")  # 取消建立金字塔
    sleep(10)
    '''添加数据方法三:使用control_send传参,添加tif数据是否建立金字塔'''
Exemplo n.º 32
0
    def add_file(self, resource):
        # Open an add file window
        autoit.win_wait_active(WINDOW_MAIN)
        autoit.control_click(WINDOW_MAIN, BUTTON_ADD_FILE)

        # Open a file
        autoit.win_wait_active(WINDOW_OPEN)
        autoit.control_set_text(WINDOW_OPEN, FORM_FILE, resource.ts_file)
        autoit.control_click(WINDOW_OPEN, BUTTON_OPEN)

        # .............
        # Choose a clip
        # .............

        # Fill a clip name
        autoit.win_wait_active(WINDOW_EDIT)
        autoit.control_set_text(WINDOW_EDIT, FORM_CLIP_NAME, resource.name)
        autoit.control_click(WINDOW_EDIT, BUTTON_OK)
Exemplo n.º 33
0
# -*- coding: utf-8 -*-

__author__ = 'Jace Xu'

import autoit

autoit.run("notepad.exe")
autoit.win_wait_active("[CLASS:Notepad]", 3)
autoit.control_send("[CLASS:Notepad]", "Edit1", "hello world{!}")
autoit.win_close("[CLASS:Notepad]")
autoit.control_click("[Class:#32770]", "Button2")
Exemplo n.º 34
0
			cols.click()
			'''
			team= browser.find_element_by_xpath("//div[@id='onload.4']/div/div[1]")
			team.click()
			team= browser.find_element_by_xpath("//div[@id='onload.4']/div/div[2]/div/div[text()='"+game[team_type]+"']")
			team.click()
			wait = WebDriverWait(browser, 100).until(EC.presence_of_element_located((By.ID, 'gametable')))
		
			time.sleep(2)
			wait = WebDriverWait(browser, 100).until(EC.presence_of_element_located((By.ID, 'downloadSData')))

			wait = WebDriverWait(browser, 100).until(EC.element_to_be_clickable((By.ID,'downloadSData')))
			button = browser.find_element_by_id("downloadSData")
			button.click()
			#AutoIT to handle the dialog window
			autoit.win_wait_active("[CLASS:MozillaDialogClass]", 10)
			autoit.send("{ALTDOWN}s{ALTUP}")
			time.sleep(1)
			autoit.send("{ENTER}")
			time.sleep(1)
		finally:
			print "Closing Browser"
			browser.close()
			#Now Move the file to a good folder
			if(team_type =="hometeam"):
				letter="A" 
			else: 
				letter="B"


			new_dir="C:\Users\Brendan\Documents\SENG474\DataCollection\Data\PenaltyKill\\" + formatDateB(game["date"])
Exemplo n.º 35
0
 def launch_application(self):
     if not autoit.win_exists(WINDOW_START):
         autoit.run(self.config.get('exe', 'tmpgencvmw'))
         autoit.win_wait_active(WINDOW_START)
     autoit.win_activate(WINDOW_START)
Exemplo n.º 36
0
 def open_new_project(self):
     autoit.control_click(WINDOW_START, BUTTON_NEW_PROJECT)
     autoit.win_wait_active(WINDOW_MAIN)