tests/ide_tests/opcua_browse_encrypted.sikuli/opcua_browse_encrypted.py
branchwxPython4
changeset 3676 2f79540660f6
parent 3672 230c8b90f3dc
child 3679 b6bca75bf3fa
equal deleted inserted replaced
3675:d331eb981b44 3676:2f79540660f6
       
     1 """ This test opens, modifies, builds and runs exemple project named "python".
       
     2 Test succeeds if runtime's stdout behaves as expected
       
     3 """
       
     4 
       
     5 import os
       
     6 import time
       
     7 
       
     8 # allow module import from current test directory's parent
       
     9 addImportPath(os.path.dirname(getBundlePath()))
       
    10 
       
    11 # common test definitions module
       
    12 from sikuliberemiz import run_test, AuxiliaryProcess
       
    13 
       
    14 def test(app):
       
    15 
       
    16     server = AuxiliaryProcess(app, ["/bin/bash",os.path.join(getBundlePath(),"opcua_service.bash")])
       
    17     #server = AuxiliaryProcess(app, ["/bin/bash","-c","echo $PWD"])
       
    18 
       
    19     server.waitPatternInStdout("CERTS READY", 5)
       
    20 
       
    21     app.doubleClick("opcua_node.png")
       
    22 
       
    23     app.WaitIdleUI()
       
    24 
       
    25     # app.click("Browse Server") # OCR didn't work because of gradient in button...
       
    26     app.click("opcua_browse_server.png")
       
    27 
       
    28     app.WaitIdleUI()
       
    29 
       
    30     app.doubleClick("Objects")
       
    31 
       
    32     app.WaitIdleUI()
       
    33 
       
    34     app.doubleClick("TestObject")
       
    35 
       
    36     app.dragNdrop("TestIn", "output variables")
       
    37 
       
    38     app.wait(1)
       
    39 
       
    40     app.dragNdrop("TestOut", "input variables")
       
    41 
       
    42     app.wait(3)
       
    43 
       
    44     app.k.Clean()
       
    45 
       
    46     app.waitForChangeAndIdleStdout()
       
    47 
       
    48     app.k.Build()
       
    49 
       
    50     app.waitForChangeAndIdleStdout()
       
    51 
       
    52     app.k.Connect()
       
    53 
       
    54     app.waitForChangeAndIdleStdout()
       
    55 
       
    56     app.k.Transfer()
       
    57 
       
    58     app.waitForChangeAndIdleStdout()
       
    59 
       
    60     app.k.Run()
       
    61 
       
    62     # wait 10 seconds for 10 patterns
       
    63     res = app.waitPatternInStdout("6.8", 10)
       
    64 
       
    65     server.close()
       
    66 
       
    67     return res
       
    68 
       
    69 run_test(test, testproject="opcua_browse_encrypted")