def proxy_temp():
    for i in range(0, 5):
        clickFunc.click_click(
            Pattern("1529030494175.png").similar(0.93).targetOffset(2, 5),
            Pattern("1529030518871.png").targetOffset(-21, -1))
        wait(5)
    return True
def pathChange(driveChange):
    clickFunc.click_click(
        "1534728025468.png",
        Pattern("1534728043828.png").similar(0.90).targetOffset(-16, -1))
    typeFunc.type_type_type(driveChange, Key.ENTER, Key.ENTER)
    wait(60)
    clickFunc.click_wait("1534729221449.png", 120)
Exemple #3
0
def clipCopy():
    clipCount = 0
    device = find(Pattern("1522026468764.png").similar(0.94))
    pane = find("1522026485828.png")

    while True:
        os.chdir("c:\sikuliLog")
        dragDrop(device, pane)
        wait(10)
        existsFunc.exists_click_click(
            Pattern("1522026553170.png").similar(0.94), "1522026628143.png",
            Pattern("1522029813911.png").targetOffset(-1, -12))
        clickFunc.click_click(
            Pattern("1522026653106.png").targetOffset(-12, 0),
            "1522026673584.png")
        wait(2)
        clickFunc.click_wait_click("1522026720780.png", "1522026730394.png", 5)
        wait("1522026752652.png", 60)
        existsFunc.exists_click_click("1522026752652.png", "1522026755408.png",
                                      "1522026766617.png")
        rightClick(pane)
        clickFunc.click_wait_click("1522031018067.png", "1522031028264.png", 5)
        fileLog.Log("clipCopy_09.17-09.27", 'a', errorConst.no_error)
        wait(30)
        clipCount = clipCount + 1
        if clipCount >= 60:

            os.chdir("E:\clip")
            files = glob.glob("*.exe")
            for a in files:
                os.remove(a)
                wait(60)
Exemple #4
0
def for_click_click(image1, image2, cnt):
    for i in range(0, cnt):
        fileLog.status = "for1"
        clickFunc.click_click(image1, image2)
        fileLog.status = "for2"
        wait(5)
    return True
Exemple #5
0
def start():
    clipCount=0    
    while True:
        fileLog.status = "G2ProblemReport"  
        App.open("C:\IDIS Solution Suite\Client\G2ProblemReporter.exe")
        wait(5)
        fileLog.status = "save file"  
        typeFunc.type_type_type(Key.ENTER,Key.TAB,Key.ENTER)
        existsFunc.whileNotExists_wait("1523843000038.png")
        typeFunc.type_type_click('E:\ProblemReporter',Key.ENTER,Pattern("1523843000038.png").targetOffset(2,-6))
        existsFunc.whileNotExists_wait("1523843210408.png")
        
        clickFunc.click_click(Pattern("1523843210408.png").targetOffset(-41,-3),"1523843231145.png")
        wait(10)
        if exists(Pattern("1523858731486.png").similar(0.86)):
            fileLog.status = "Upload"  
            click("1523858747983.png")
            clickFunc.click_click("1523845300001.png","1523845720314.png")
            fileLog.Log("G2ProblemReporter_04.16-04.23",'a',errorConst.no_error) 
        else:
            fileLog.status = None            
            existsFunc.whileNotExists_wait(Pattern("1523843985601.png").similar(0.88))
            clickFunc.click_click_click("1523845300001.png","1523845300001.png","1523845720314.png")
            typeFunc.keyDownUp(Key.CTRL,'w')
            fileLog.Log("G2ProblemReporter_04.16-04.23",'a',errorConst.no_error) 
            
        clipCount=clipCount +1

        if clipCount>=30:            
       
            os.chdir("E:\ProblemReporter")
            files = glob.glob("*.zip")
            for a in files:   
                os.remove(a)
                wait(120)
Exemple #6
0
def addDevice():
    global tempCnt
    tempCnt = 0
    clickFunc.click_click("1536542513998.png",Pattern("1536542583611.png").similar(0.97).targetOffset(41,-10))
    if flagCheck == 0:
        fileLog.status = "flagCheck_if"
        fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
        typeFunc.type_type_type(Key.TAB,Key.UP,Key.UP)
        typeFunc.type_type(Key.DOWN,Key.DOWN)
        fileLog.status = "flagCheck_ifFinish"
        fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
    else :
        fileLog.status = "flagCheck_else"
        fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
        type(Key.TAB)
        wait(2)
        fileLog.status = "flagCheck_elseFinish"
        fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
        
    typeFunc.type_type(Key.TAB,'10.0.127.35')
    fileLog.status = "AddressFinish"
    fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
    typeFunc.type_type_type(Key.TAB,Key.TAB,Key.TAB)
    fileLog.status = "focusFinish"
    fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
    while tempCnt ==0:    
        if typeFunc.type_existsClick(Key.SPACE,10,Pattern("1536543140085.png").targetOffset(-39,5)) == True:
            fileLog.status = "deviceCheck_if"
            fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
            deviceScanCheck()
            tempCnt = 1
        else:
            fileLog.status = "deviceCheck_else"
            fileLog.Log("deviceDel_Admin_10.01-10.08",'a',errorConst.no_error)
            typeFunc.type_type_type(Key.TAB,Key.TAB,Key.TAB)
Exemple #7
0
def deviceScanCheck():

    #existsFunc.whileNotExists_type_wait(Pattern("1536543140085.png").targetOffset(-39,5),Key.SPACE,30)

#    if typeFunc.type_existsClick(Key.SPACE, 30, Pattern("1536543140085.png").targetOffset(-39,5)) == True: 
    clickFunc.click_click(Pattern("1536543140085.png").targetOffset(-39,5),"1536543204973.png")
    if typeFunc.type_existsClick('admin'+Key.ENTER,10,Pattern("1536543327921.png").similar(0.92)) == True:
        clickFunc.click_wait("1536543370916.png",30)
    else:
        type(Key.ENTER)
        wait(10)
        clickFunc.click_wait("1536543370916.png",30)      
def recSetup():
    global flagCheck
    fileLog.status = 'begin'
    #    fileLog.Log("untilREC_reconstruct_08.27-09.03",'a',errorConst.no_error)
    clickFunc.click_type(
        Pattern("1534728572838.png").targetOffset(5, 11), Key.ENTER)
    #    fileLog.Log("untilREC_reconstruct_08.27-09.03",'a',errorConst.no_error)
    fileLog.status = 'rec setup'
    typeFunc.type_type_click(Key.RIGHT, Key.RIGHT, "1535337017457.png")
    #    fileLog.Log("untilREC_reconstruct_08.27-09.03",'a',errorConst.no_error)
    fileLog.status = 'storage setup'
    existsFunc.whileNotExists_wait(Pattern("1535336548316.png").similar(0.88))
    #    fileLog.Log("untilREC_reconstruct_08.27-09.03",'a',errorConst.no_error)
    fileLog.status = 'running check'
    clickFunc.click_click(
        Pattern("1535336548316.png").similar(0.91), "1535336597401.png")
    #    fileLog.Log("untilREC_reconstruct_08.27-09.03",'a',errorConst.no_error)
    fileLog.status = 'reconstruct start'
    clickFunc.click_click(
        Pattern("1535336611180.png").similar(0.86), "1535336726754.png")
    #    fileLog.Log("untilREC_reconstruct_08.27-09.03",'a',errorConst.no_error)
    fileLog.status = 'close'
def REC_DeviceDel():
    while True:

        doubleClick(Pattern("1521075002526.png").similar(0.83))
        wait(2)
        clickFunc.click_click(
            Pattern("1521075039928.png").similar(0.91),
            Pattern("1521075067474.png").similar(0.88))
        type("_56")
        wait(2)
        if exists(Pattern("1521075253312.png").similar(0.88)):
            fileLog.status = "rec_Del"
            clickFunc.click_click(
                Pattern("1521075253312.png").similar(0.88),
                Pattern("1521075297394.png").similar(0.82))
            wait(2)
            clickFunc.click_wait_click("1521075324374.png",
                                       "1521075339832.png", 20)
            if not exists(Pattern("1521075918737.png").similar(0.81)):
                fileLog.Log_flagCheck("REC_DeviceDel_04.23-04.30", 'a',
                                      errorConst.no_error)
            else:
                fileLog.Log_flagCheck("REC_DeviceDel_04.23-04.30", 'a',
                                      errorConst.error_1)
                break

        else:
            fileLog.status = "rec_Add"
            clickFunc.click_click(
                "1521075591041.png",
                Pattern("1521075599238.png").targetOffset(-9, -11))
            clickFunc.click_wait_click("1521075324374.png",
                                       "1521075339832.png", 20)
            wait(20)
            if exists(Pattern("1521082064448.png").similar(0.90)):
                fileLog.Log_flagCheck("REC_DeviceDel_04.23-04.30", 'a',
                                      errorConst.no_error)
            else:
                fileLog.Log_flagCheck("REC_DeviceDel_04.23-04.30", 'a',
                                      errorConst.error_1)
                break
Exemple #10
0
        fileLog.status = "device"
        dragDrop(device, pane)
        wait(5)
        fileLog.status = "device drag"
        if forFunc.for_click_click(
                Pattern("1529290607934.png").similar(0.96).targetOffset(-7, 3),
                Pattern("1529288997453.png").targetOffset(-22, 3), 1) == True:
            fileLog.status = "layout"
            randomFunc.ranNumber(10, 300)
            wait(randomFunc.ranTime)
            dragDrop(layout, pane)
            fileLog.status = "layout drag"

            wait(5)
            fileLog.status = "layt"
        if forFunc.for_click_click(
                Pattern("1529290607934.png").similar(0.96).targetOffset(-7, 3),
                Pattern("1529288997453.png").targetOffset(-22, 3), 1) == True:
            fileLog.status = "pane"
            randomFunc.ranNumber(10, 300)
            wait(randomFunc.ranTime)
            rightClick(pane)
            clickFunc.click_click("1529290226726.png", "1529290237097.png")
            fileLog.status = "clear"

        fileLog.Log("PlayTab_device&layout_06.25-07.02", 'a',
                    errorConst.no_error)

except FindFailed:
    fileLog.Log("PlayTab_device&layout_06.25-07.02", 'a', errorConst.error_1)
Exemple #11
0
    click(imge1)
    wait(2)
    if not exists(imge2):
        return True


try:
    fileLog.cnt = 0
    fileLog.status = None
    fileLog.Log("sdk_evt", 'a', errorConst.no_error)

    while True:
        if aliveCheck("1529568159493.png",
                      Pattern("1529568212403.png").exact().targetOffset(
                          3, 3)) == True:

            for i in range(0, 10):
                clickFunc.click_click(
                    "1529568260274.png",
                    Pattern("1529568212403.png").exact().targetOffset(3, 3))
                wait(2)

                fileLog.Log("sdk_evt", 'a', errorConst.no_error)
        else:

            fileLog.Log("sdk_evt", 'a', errorConst.error_1)
            break

except FindFailed:

    fileLog.Log("sdk_evt", 'a', errorConst.error_1)