← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #643548]: AssertionError

 

Question #643548 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/643548

    Status: Answered => Open

Abhi is still having a problem:
#If correct result(Molde)is not found on the screen, assert failure

if not rgn.exists(Sikuli.Pattern(Model).similar(0.99)):

    #Captures the window and save the content as image on the path below

    focusWindow = App.focusedWindow()
    regionImage = capture(focusWindow)
    shutil.move(regionImage, os.path.join(r'C:\Errors\model','Model.jpg'))
    print "Model drawing failed"
    print "Path to image is: "+os.abspath('C:\Errors\model\Model.jpg') 
    click("1458553913060.png")
    wait(1)
    click("1463297616160.png")
    wait(1)
    click("1450875259885.png")
    doubleClick("1453237275065.png")
    wait(1)

    #Clicks on field-filename to enter the name for the model

    click(Region(361,446,7,12))
    wait(1)
    type("Automata_Example2")
    wait(1)
    click("1450875347964.png")
    assert False

#If correct result(Model)is found on the screen, test passes

if rgn.find(Sikuli.Pattern(Model).similar(0.99)):
    
   #Save the model

    click("1463297599172.png")
    click("1463297616160.png")
    wait(1)
    click("1450875259885.png")
    doubleClick("1453237275065.png")
    wait(1)

    #Clicks on field-filename to enter the name for the model

    click(Region(361,446,7,12))
    wait(1)
    type("Automata_Example2")
    wait(1)
    click("1450875347964.png")
 
-------------------------------------------------------------------------------------------------------------------

this is code and condition need to satisfied so there I wrote assert
False. but don't understand what is the problem.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.