Re: [Sikuli-driver] [Question #644415]: Unable to find Pattern within a pre set region on the screen.

2017-07-02 Thread masuo
Question #644415 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644415

masuo proposed the following answer:
Sikuli searches the region using a default minimum similarity of 0.7.
http://sikulix-2014.readthedocs.io/en/latest/pattern.html

It may be effective to set minimum similarity smaller.
I show example codes by python.

[when pattern methods are not used]
click("1499011519197.png")

[when pattern methods are used to set the minimum similarity to 0.6]
click(Pattern("1499011519197.png").similar(0.60))

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #644415]: Unable to find Pattern within a pre set region on the screen.

2017-06-27 Thread masuo
Question #644415 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644415

masuo proposed the following answer:
There is "@S(0)[0,0 1680x1050]" in log.
Region(1310,654,73,68) is out of Screen(0), isnt it?
You are using two monitors.
The image may exist in Screen(1).

http://sikulix-2014.readthedocs.io/en/latest/screen.html#multi-monitor-
environments

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #644415]: Unable to find Pattern within a pre set region on the screen.

2017-06-23 Thread masuo
Question #644415 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644415

masuo posted a new comment:
Sorry your codes is Java.
I misunderstood it.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #644415]: Unable to find Pattern within a pre set region on the screen.

2017-06-23 Thread masuo
Question #644415 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644415

Status: Open => Answered

masuo proposed the following answer:
I think I don't understand correctly what you want to do.
So I'm sorry if I misunderstood it.

these 2 steps are unnecessary.

Screen scr1 = new Screen(0);
scr1.setROI(reg);

And try change this step.

[before]scr1.click(POSItemQty9);
[after]reg.click(POSItemQty9);

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #644415]: Unable to find Pattern within a pre set region on the screen.

2017-06-21 Thread Chris Rhoads
New question #644415 on Sikuli:
https://answers.launchpad.net/sikuli/+question/644415

Attempting to set a region for each Pattern I need to find in order to improve 
consistency of where the mouse is clicking.

So Im setting the region (x,y,w,h) and I set the screen as Im using two 
monitors (I'm basing which screen off the other patterns that are already 
locating without a defined region)

I'm obviously setting something up incorrectly and not understanding how to do 
it properly.

Using Java on a MacBook Pro running Sierra 10.12.5

>CODE HERE<<

public void click9() throws FindFailed, InterruptedException {

Region reg = new Region(1310,654,73,68);

Screen scr1 = new Screen(0);

try {

scr1.setROI(reg);
System.out.println("setROI(reg) completed.");
scr1.click(POSItemQty9);
System.out.println("Found 9 inside specified posItem9reg.");


//reg.click(POSItemQty9); THIS DOESNT WORK!!!
System.out.println("First Attempt To Find POSItemQty9 .");

} catch (FindFailed f) {
System.out.println("Exception In First Attempt: " + f.getMessage());

Assert.fail("Image wasn't found. Please use correct image.");
}

}




>>


First Attempt To Find Image.
[log] DOUBLE CLICK on L(1240,199)@S(0)[0,0 1680x1050] (681 msec)
Second Attempt To Find Image.
Waiting on EatInTotal button to appear.
EatInTotal button has appeared.
User has now accessed the POS system.
posOrderGeneration() has just entered
logInCashier and userCreatedSales objects have just been created
userLogged has been detected, now entering 
'userCreatesSales.generate200InSales();' 
generate200InSales method has just entered...
setROI(reg) completed.
Exception In First Attempt: 
/Users/chrisrhoads/IdeaProjects/SikuliScript_POS/src/test/java/resources/RIB_POS/POSItemQty9.png:
 (35x44) in S(0)[0,0 1680x1050] E:Y, T:3.0

junit.framework.AssertionFailedError: Image wasn't found. Please use correct 
image.

at junit.framework.Assert.fail(Assert.java:47)
at 
com.qsrsoft.PageObjects.Utilities.userCreatesSales.click9(userCreatesSales.java:173)
at 
com.qsrsoft.PageObjects.Utilities.userCreatesSales.buy9BigMac(userCreatesSales.java:381)
at 
com.qsrsoft.PageObjects.Utilities.userCreatesSales.generate200InSales(userCreatesSales.java:72)
at 
com.qsrsoft.PageObjects.RIB_POS_MainPage.posOrderGeneration(RIB_POS_MainPage.java:63)
at pos_tests.userPlacesEatInOrder.posOrder(userPlacesEatInOrder.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)



Any and all help/guidance is much appreciated!

Crhoads1024


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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp