sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37911
[Question #293250]: Strange behavior with Chrome and Flash webapp
New question #293250 on Sikuli:
https://answers.launchpad.net/sikuli/+question/293250
I've got a weird one. I'm writing automated tests for an Adobe Flash based webapp and I have a strange problem and I'm wondering if anyone else has ever seen this and possibly has a work-a-round.
I have some 40 test cases written and they all work fine on both Firefox and on Chrome. I wrote a new test the other day and for some strange reason it fails only on Chrome. The test is interacting with a popup dialog (which many of my tests do) and it's checking to see if an image appears in the dialog. I've written a little framework around Sikuli that writes the image being sought and an image of the browser window to the log file when a failure occurs. The image being sought is very clearly present in the browser image. I have tried changing what is being sought to VERY obvious images but still Sikuli does not “see” it. What is even more odd is that I always try to reduce the size of the Region that Sikuli needs to search so my test finds a label on the dialog and then “grows” the Region to define the area to search and Sikuli successfully finds this label and grows the Region. I know this because I use the Region.highlight() to draw a box around the search Region. It's almost as if the search Region is blank inside. The other thing is that I use this approach all over my test code and it works just fine, just not in this case. Very weird! Oh and I have played with the “similar” setting with no impact.
I am running on Windows 7 and all of my tests are in Java using the Sikuli Java SDK library.
Anyone have any thoughts?
Code snippet:
Region findRegion = {dialog region}.wait({label on dialog}).grow(0, 300, 5, 130);
findRegion.hightlight(1);
Pattern pattern = new Pattern({image being sought}).similar(0.98f);
// The line below is where the failure occurs.
Region tmp = findRegion.wait(pattern);
Thanks,
Spence
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.