← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #213457]: exists function not working after defining region

 

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

    Status: Answered => Open

Alex Yi is still having a problem:
It is so weird.  The same issue is happening on the other dashboard that I am testing.
Here are some sime codes:
#test_010 - Verify datapoint for EIO Target
    #@unittest.skip("Skipping for Now!")
    def test_010VerifyEIOTargetHoverValuefor80SL(self):     
        getLastMatch().highlight(2)
        DataPointRegion = Region(602,669,23,18)
        hover(DataPointRegion.getLastMatch())
        assert exists("EIOTargetsValueFor80SL.png")

#test_011 - Verify datapoint for EIO Target
    #@unittest.skip("Skipping for Now!")
    def test_011VerifyEIOTargetHoverValuefor85SL(self):     
        getLastMatch().highlight(2)
        DataPointRegion = Region(731,520,22,18)
        if DataPointRegion.exists("EIOTargetDataPoint.png"):
            hover(DataPointRegion.getLastMatch())
        assert exists(Pattern("EIOTargetsValueFor85SL.png").similar(0.95))

Both of them are not working for some reason.
The top one I am hovering over to a point in a region using just the region where the second one I created a region and then I'm hovering over to an image within that image.  Here is the link to the screenshots of these image.
https://www.dropbox.com/sh/dk2it0o2so8fso5/hlRe6raDv8

You'll notice two screenshots are the image in my assert statements from two test cases above.
The whole dashboard image shows the whole dashboard and you'll notice there are two graphs with 5 datapoints on each.  The top graph(blue line) has little star like image that when you hover over it pops out an image with dollar value.  Basically, I'm trying to test that image so that image contains the correct value.  As you can see those two images are identical, however, my test is failing even with defaul similarity level.

The weird things is this is happening on random cases.
I have no idea why.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.