← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #202419]: Weird rsults for the same image comparison using sikuli

 

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

    Status: Needs information => Open

Shilpi Gupta gave more information on the question:
Thanks! for responding RaiMan,

yes I am programming in Java. And I am using robot to capture a screenshot.
I am doing a Multibrowser automation. My script will run on 3 browsers sequentially on same syatem.


Yes I tried both finder.find() method and Screen objects and pattern objects.

Using Finder object : I am trying something like this:

            String filePath ="drive path";
            function.Snapshot.Capture(filePath +"\\" +testCaseName+"_HomePageScreen"+".png");  // take the screen shot at run time and store in the drive
           String  imgPathName = filePath +"\\" +testCaseName+"_HomePageScreen"+".png";
           finderObj = new Finder(imgPathName);
           finderObj.find("HeaderButtons.png",0.80);    // Header.png image I am searching at Homepage screen with 80% ratio
            if (finderObj.hasNext()){
                 LOGGER.info("HeaderButtons  :  "+ browserName + "     - Pass!");
            }else {
                  LOGGER.info("HeaderButtons  :"+ browserName + "  - Fail");
            }

Using Screen and Pattern object I tried this:-

// Navigate to that screen where we want to do comaprison
                 Pattern p1__s3_HeaderButton = new Pattern("Header.png ");      // holds the drive path where pattern image exists
                 Screen screen = new Screen();   

                  if(screen3.exists(p1__s3_HeaderButton.similar((float)0.80))!= null){
                          LOGGER.info("p1__s3_HeaderButton     "+ browserName + "     - Pass!");
                  }
                 else{
                          LOGGER.info("p1__s3_HeaderButton     "+ browserName + "     - Fail!");
                  }

Both the ways I am getting same results. I believe internally both
finder.find() and pattern.similar() method call the same function.

My question was actually the image which I am comparing with all
browsers is exacltly same. But why its failing I don't know reason for
that. I am trying to find out something by doing variation in ratio.


Thanks,
Shilpi

________________________________________
From: bounces@xxxxxxxxxxxxx [bounces@xxxxxxxxxxxxx] on behalf of RaiMan [question202419@xxxxxxxxxxxxxxxxxxxxx]
Sent: Friday, July 06, 2012 5:45 PM
To: Shilpi Gupta (WT01 - ENU)
Subject: Re: [Question #202419]: Weird rsults for the same image comparison     using sikuli

Your question #202419 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/202419

    Status: Open => Needs information

RaiMan requested more information:
I suppose, you are Programming in Java?

--  taking snapshots through Java API
I suppose you are using Java Robot?

-- Parts of the image which I am comparing is same in all four screens.
not really clear what that means?
I guess: SOME of the images are same .... ???

-- One image I am comparing with four screens
not really clear:
live-comparing on a four screen multi monitor system or screenshots from 4 different systems??

Are you using the similarity feature?

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/sikuli/+question/202419

You received this question notification because you asked the question.
Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.

www.wipro.com

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