[Sikuli-driver] [Question #270599]: While testing a GUI if the script does not see an image it wait fail and the script stops.

2015-08-20 Thread Jason
New question #270599 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270599

I am testing a GUI application and I want to log failures (images missing), but 
want the script to complete without stopping in the middle.

I am using the assert exists(#link_to_image#), 5) When the script detects a 
missing image it will stop in the middle and log the error in the message 
field. I do not want to SKIP , the missing image in a Not Found situation 
and I do not want to ABORT or RETRY either. The purpose of my testing is to 
detect issues with the GUI not skip over them.

Is there another way to report the error at the end once the script is finished 
without stopping in the middle?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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] [Bug 1486873] [NEW] bug found in SikuliX Documentation

2015-08-20 Thread airong
Public bug reported:

there is a bug in
http://sikulix-2014.readthedocs.org/en/latest/scripting.html, the detail
infomation as following:

in the section of Writing and redirecting log and debug messages

it can be found :
Debug.setLogfile(absolute-path-to-file) to redirect the Sikuli messages to a 
file, no default

while Debug object has no attribute setLogfile, so repalce setLogfile as
setLogFile

** Affects: sikuli
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486873

Title:
  bug found in SikuliX Documentation

Status in Sikuli:
  New

Bug description:
  there is a bug in
  http://sikulix-2014.readthedocs.org/en/latest/scripting.html, the
  detail infomation as following:

  in the section of Writing and redirecting log and debug messages

  it can be found :
  Debug.setLogfile(absolute-path-to-file) to redirect the Sikuli messages to 
a file, no default

  while Debug object has no attribute setLogfile, so repalce setLogfile
  as setLogFile

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486873/+subscriptions

___
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 #270582]: Problems setting Setting.WaitScanRate in Sikuli 1.0.1

2015-08-20 Thread joseytw
New question #270582 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270582

Hello, 

I have searched the forums and while I have read posts that seem to apply to 
the problem I am having, I can not nail down a workable solution.  I am using 
Sikuli 1.0.1, and I am coding in Java on a Windows 7 machine.  I am also fairly 
new to coding in Java and using Sikuli.

My problem is this:  

I have an array of 10 small images (10x15 pixles in size) that I iterate 
through looking for a match using r.exists and when a match NOT found there 
seems to be a delay of ~300 ms before the next check is made.

Here is the code:

int i =0;
for(Pattern p : pNumberArray){
if(r.exists(p.similar(.9f), 0) != null){
System.out.println(library.getTime() +  Image Found:  + p);
return i;
}
System.out.println(library.getTime() +  Image not found:  + p);
i++;
}

Here is the result when I run the above code.

12:19:01:032 Image not found 
12:19:01:365 Image not found 
12:19:01:698 Image not found
12:19:02:031 Image not found
12:19:02:364 Image not found 
12:19:02:697 Image not found

I was hoping using a 0 for (r.exists(p/similar(.9f), 0) would fix the 300ms 
delay problem but it does not.

I then read up on 'Settings.AutoWaitTimeout' 
(https://answers.launchpad.net/sikuli/+question/251337) but ruled it out as not 
applicable in my case.  As I understand it, using the 0 in 
(r.exists(p/similar(.9f), 0) forces a one time check of the image and 
immediately returns the match if found or NULL if not 
(https://answers.launchpad.net/sikuli/+question/251337), so there should be NO 
delay in a response whether an image is found or not.

Searching forum posts turned me on to 'Settings.ScanRate' 
(https://answers.launchpad.net/sikuli/+question/194144) so I tried setting 
'Settings.WaitScanRate = 100;' so that it would search for a match for no more 
than .01 seconds and return the result, but changing that setting had no 
effect.  I also tried a variety of values including, 500, 1, .1f, and .01f but 
the results when running the code above was always the same with ~300 ms delay.

So all that being said, that leads to my questions:
1) I assumed that setting the timeout to 0 when using exists on a region 
(r.exists(p/similar(.9f), 0) would result in NO delay in a response whether an 
image is found or not.  That is not the case.  Why is there a ~300 when the 
timeout is set to 0?

2) I assumed that setting 'Settings.WaitScanRate = 100;' would force a search 
result at the end of .01 seconds.  It does not.  Am I missing something about 
how this works?

3) One post I read mentioned that there used to be an issue setting the values 
of Settings fields wouldn't work because the variables used a 'protected' 
modifier, but I can change the value and see the results of modifying the value 
between 'Settings.MoveMouseDelay = 1;' and 'Settings.MoveMouseDelay = 0;' so 
that leads me to believe that I can change the value of Settings fields.  Is 
the 'Settings.WaitScanRate' indeed a protected variable and one that I cannot 
change?

I spent hours and hours and hours reading forum posts and experimenting with 
different code combinations but I can't get rid of the ~300ms delay when an 
image is NOT found.

Thanks in advance for any wise words of wisdom!

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270585]: Fundamental question on using Sikuli

2015-08-20 Thread Sahil Dev
Question #270585 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270585

Description changed to:
1) As I see, Sikuli is based on image recognition approach. In that
case, it is compeltely independent of the technology with which my
application has been developed in. This is because, I intend using
Sikuli for creating automated tests in several of my Engineering
applications that I use.

One of my application is a very old Engineering analysis application
written in Fortran wheras another application is quite recent developed
in C++ , .NET framework.

So, since Sikuli cocnept based on image comaprison and then peoforming
keyboard/mouse action on objects, it does not matter at all if my
application is developed in Fortran or .NET framework. AM I RIGHT?

I have not yet started using Sikuli but understanding the basics before
I dive in and start swimming.

2) As I understand  Sikuli is based on image recognition approach.

I have not yet started using Sikuli but understanding the basics before
I dive in and start swimming.


Canyone just explain to me the approach (steps) Sikuli code will follow to do 
the follwoing

a)Go to start button on my computer
b) Open Miocrosoft word
c) Go to file -Open
d) Go to C:\my_files and open a word file abc.docx

I just want to undestand the approach clearly on what images will eb
compared in the above steps and how the image comparison will be used to
peform keyboard/mouse actions.

I shall be grateful if someone just explains the approach relative to
the above simple steps. Please can someon help?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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] [Bug 1486922] Re: File modified when opening

2015-08-20 Thread Graziano Previato
Could be a problem on the fileserver... I'm checking...

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486922

Title:
  File modified when opening

Status in Sikuli:
  New

Bug description:
  I have sikuly IDE 1.0.1 running on MacOSX 10.9

  the procedure is the following:
  def GetSeq():
  
fl_seq=open('/Network/Servers/osxge1.acamarshipping.com/Users/gpreviato/src/AcroEmul/SeqRef.seq','r')

  str_seq=fl_seq.read()
  fl_seq.close()
  seq=int(str_seq)
  return seq

  The file server is a MacOSX server 10.6 exporting the file inf AFP.

  Before run the procedure the content of the file is:
  10

  after to have run the procedure, vi shows:
  1000^@^@^@

  this happens after the conter touch '1'.
  Having 1 in the file, the content is changed in 1000^@^@

  Everything was OK up to 

  I'm trying to understand...

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486922/+subscriptions

___
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 #270585]: Fundamental question on using Sikuli

2015-08-20 Thread Sahil Dev
New question #270585 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270585

1) As I see, Sikuli is based on image recognition approach. In that case, it 
is compeltely independent of the technology with which my application has 
been developed in. This is because, I intend using Sikuli for creating 
automated tests in several of my Engineering applications that I use.

One of my application is a very old Engineering analysis application written in 
Fortran wheras another application is quite recent developed in C++ , .NET 
framework.

So, since Sikuli cocnept based on image comaprison and then peoforming 
keyboard/mouse action on objects, it does not matter at all if my application 
is developed in Fortran or .NET framework.

I have not yet started using Sikuli but understanding the basics before I dive 
in and start swimming.

2) As I understand  Sikuli is based on image recognition approach.

I have not yet started using Sikuli but understanding the basics before I dive 
in and start swimming.


Canyone just explain to me the approach (steps) Sikuli code will follow to do 
the follwoing

a)Go to start button on my computer
b) Open Miocrosoft word
c) Go to file -Open
d) Go to C:\my_files and open a word file abc.docx

I just want to undestand the approach clearly on what images will eb compared 
in the above steps and how the image comparison will be used to peform 
keyboard/mouse actions.

I shall be grateful if someone just explains the approach relative to the above 
simple steps. Please can someon help?






-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270449]: App.close fails to close

2015-08-20 Thread RaiMan
Question #270449 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270449

RaiMan posted a new comment:
@Jeff: thanks

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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] [Bug 1486918] [NEW] Launch Chrome in Mac : execution error: Can’t get application Chrome.

2015-08-20 Thread Naidu
Public bug reported:

Error Log:

[debug] RunTimeAPI: loadLib: libMacUtil.dylib
[debug] Runner: AppleScript:
#!/usr/bin/osascript
tell app Chrome to activate
returned:
*error*
/var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_1902161459/sikuli-859522232112186901.script:21:29:
 execution error: Can’t get application Chrome. (-1728)

[error] App.focus failed:  [-1:Chrome ()] Chrome
[debug] Region: ( ⌘ )  TYPE l
[debug] Region: ( ⌘ )  TYPE l
[debug] Region:  TYPE #ENTER.


Code Used: 

App ff = new App(chrome);
ff.focus();
screen.type(l, Key.CMD);
screen.wait((double) 3.0);
screen.type(l, Key.CMD);
screen.paste(link);
screen.type(Key.ENTER);

** Affects: sikuli
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486918

Title:
  Launch Chrome in Mac : execution error: Can’t get application
  Chrome.

Status in Sikuli:
  New

Bug description:
  Error Log:

  [debug] RunTimeAPI: loadLib: libMacUtil.dylib
  [debug] Runner: AppleScript:
  #!/usr/bin/osascript
  tell app Chrome to activate
  returned:
  *error*
  
/var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_1902161459/sikuli-859522232112186901.script:21:29:
 execution error: Can’t get application Chrome. (-1728)

  [error] App.focus failed:  [-1:Chrome ()] Chrome
  [debug] Region: ( ⌘ )  TYPE l
  [debug] Region: ( ⌘ )  TYPE l
  [debug] Region:  TYPE #ENTER.

  
  Code Used: 

  App ff = new App(chrome);
  ff.focus();
  screen.type(l, Key.CMD);
  screen.wait((double) 3.0);
  screen.type(l, Key.CMD);
  screen.paste(link);
  screen.type(Key.ENTER);

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486918/+subscriptions

___
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] [Bug 1486922] [NEW] File modified when opening

2015-08-20 Thread Graziano Previato
Public bug reported:

I have sikuly IDE 1.0.1 running on MacOSX 10.9

the procedure is the following:
def GetSeq():

fl_seq=open('/Network/Servers/osxge1.acamarshipping.com/Users/gpreviato/src/AcroEmul/SeqRef.seq','r')

str_seq=fl_seq.read()
fl_seq.close()
seq=int(str_seq)
return seq

The file server is a MacOSX server 10.6 exporting the file inf AFP.

Before run the procedure the content of the file is:
10

after to have run the procedure, vi shows:
1000^@^@^@

this happens after the conter touch '1'.
Having 1 in the file, the content is changed in 1000^@^@

Everything was OK up to 

I'm trying to understand...

** Affects: sikuli
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486922

Title:
  File modified when opening

Status in Sikuli:
  New

Bug description:
  I have sikuly IDE 1.0.1 running on MacOSX 10.9

  the procedure is the following:
  def GetSeq():
  
fl_seq=open('/Network/Servers/osxge1.acamarshipping.com/Users/gpreviato/src/AcroEmul/SeqRef.seq','r')

  str_seq=fl_seq.read()
  fl_seq.close()
  seq=int(str_seq)
  return seq

  The file server is a MacOSX server 10.6 exporting the file inf AFP.

  Before run the procedure the content of the file is:
  10

  after to have run the procedure, vi shows:
  1000^@^@^@

  this happens after the conter touch '1'.
  Having 1 in the file, the content is changed in 1000^@^@

  Everything was OK up to 

  I'm trying to understand...

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486922/+subscriptions

___
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] [Bug 1486873] Re: SikuliX Documentation: Debug.setLogfile should be Debug.setLogFile

2015-08-20 Thread RaiMan
thanks. fixed.

** Summary changed:

- bug found in SikuliX Documentation
+ SikuliX Documentation: Debug.setLogfile should be Debug.setLogFile

** Changed in: sikuli
   Status: New = Fix Committed

** Changed in: sikuli
   Status: Fix Committed = Fix Released

** Changed in: sikuli
 Assignee: (unassigned) = RaiMan (raimund-hocke)

** Changed in: sikuli
Milestone: None = 1.1.0

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486873

Title:
  SikuliX Documentation: Debug.setLogfile should be Debug.setLogFile

Status in Sikuli:
  Fix Released

Bug description:
  there is a bug in
  http://sikulix-2014.readthedocs.org/en/latest/scripting.html, the
  detail infomation as following:

  in the section of Writing and redirecting log and debug messages

  it can be found :
  Debug.setLogfile(absolute-path-to-file) to redirect the Sikuli messages to 
a file, no default

  while Debug object has no attribute setLogfile, so repalce setLogfile
  as setLogFile

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486873/+subscriptions

___
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] [Bug 1486918] Re: Launch Chrome in Mac : execution error: Can’t get application Chrome.

2015-08-20 Thread Naidu
It works if i use 'Google chrome'.

Should it work for 'chrome'?? If so, its fine.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486918

Title:
  Launch Chrome in Mac : execution error: Can’t get application
  Chrome.

Status in Sikuli:
  New

Bug description:
  Error Log:

  [debug] RunTimeAPI: loadLib: libMacUtil.dylib
  [debug] Runner: AppleScript:
  #!/usr/bin/osascript
  tell app Chrome to activate
  returned:
  *error*
  
/var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_1902161459/sikuli-859522232112186901.script:21:29:
 execution error: Can’t get application Chrome. (-1728)

  [error] App.focus failed:  [-1:Chrome ()] Chrome
  [debug] Region: ( ⌘ )  TYPE l
  [debug] Region: ( ⌘ )  TYPE l
  [debug] Region:  TYPE #ENTER.

  
  Code Used: 

  App ff = new App(chrome);
  ff.focus();
  screen.type(l, Key.CMD);
  screen.wait((double) 3.0);
  screen.type(l, Key.CMD);
  screen.paste(link);
  screen.type(Key.ENTER);

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486918/+subscriptions

___
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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread RaiMan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

Status: Open = Answered

RaiMan proposed the following answer:

I want to be sure, that we are still talking about the latest build of 1.1.0, 
since you say you are using:

'java -jar sikuli-script.jar -r c:\path\to\executor.sikuli --args
[arguments]'

... this does not work with 1.1.0, because there is no sikuli-script.jar
in 1.1.0.

Furthermore the exception (comment #5) does not correlate with the
Region.java of 1.1.0, so I doubt, that you are really using 1.1.0

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270546]: Comparing texts between 2 versions of my application

2015-08-20 Thread Sahil Dev
Question #270546 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270546

Status: Answered = Open

Sahil Dev is still having a problem:
Thank you very much.

Is it possible to compare the content of a table using Sikuli functions
(or a Python feature as explained by Eugene Maslov?

That is: my application poroduces some tables (with rows and columns as
output).

I want to compare the table content in 2 versions of my application
using Sikuli to see if the contents are same.

Is it possible?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270582]: What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 1.0.1, Java, Windows)

2015-08-20 Thread joseytw
Question #270582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270582

Summary changed to:
What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 
1.0.1, Java, Windows)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270582]: What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 1.0.1, Java, Windows)

2015-08-20 Thread joseytw
Question #270582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270582

Description changed to:
Hello,

I have searched the forums and while I have read posts that seem to
apply to the problem I am having, I can not nail down a workable
solution.  I am using Sikuli 1.0.1, and I am coding in Java on a Windows
7 machine.  I am also fairly new to coding in Java and using Sikuli.

My problem is this:

I have an array of 10 small images (10x15 pixles in size) that I iterate
through looking for a match using r.exists (the region is 12x17 pixels)
and when a match NOT found there seems to be a delay of ~300 ms before
the next check is made.

Here is the code:

int i =0;
for(Pattern p : pNumberArray){
if(r.exists(p.similar(.9f), 0) != null){
System.out.println(library.getTime() +  Image Found:  + p);
return i;
}
System.out.println(library.getTime() +  Image not found:  + p);
i++;
}

Here is the result when I run the above code.

12:19:01:032 Image not found 
12:19:01:365 Image not found 
12:19:01:698 Image not found
12:19:02:031 Image not found
12:19:02:364 Image not found 
12:19:02:697 Image not found

I was hoping using a 0 for (r.exists(p/similar(.9f), 0) would fix the
300ms delay problem but it does not.

I then read up on 'Settings.AutoWaitTimeout'
(https://answers.launchpad.net/sikuli/+question/251337) but ruled it out
as not applicable in my case.  As I understand it, using the 0 in
(r.exists(p/similar(.9f), 0) forces a one time check of the image and
immediately returns the match if found or NULL if not
(https://answers.launchpad.net/sikuli/+question/251337), so there should
be NO delay in a response whether an image is found or not.

Searching forum posts turned me on to 'Settings.ScanRate'
(https://answers.launchpad.net/sikuli/+question/194144) so I tried
setting 'Settings.WaitScanRate = 100;' so that it would search for a
match for no more than .01 seconds and return the result, but changing
that setting had no effect.  I also tried a variety of values including,
500, 1, .1f, and .01f but the results when running the code above was
always the same with ~300 ms delay.

So all that being said, that leads to my questions:
1) I assumed that setting the timeout to 0 when using exists on a region 
(r.exists(p/similar(.9f), 0) would result in NO delay in a response whether an 
image is found or not.  That is not the case.  Why is there a ~300 when the 
timeout is set to 0?

2) I assumed that setting 'Settings.WaitScanRate = 100;' would force a
search result at the end of .01 seconds.  It does not.  Am I missing
something about how this works?

3) One post I read mentioned that there used to be an issue setting the
values of Settings fields wouldn't work because the variables used a
'protected' modifier, but I can change the value and see the results of
modifying the value between 'Settings.MoveMouseDelay = 1;' and
'Settings.MoveMouseDelay = 0;' so that leads me to believe that I can
change the value of Settings fields.  Is the 'Settings.WaitScanRate'
indeed a protected variable and one that I cannot change?

4) I can't imagine it taking ~300ms to match a 10x15 pixel image in a
12x17 pixel search region.  That 300ms isn't the amount of time it takes
to actually search for a match in the region is it?

I spent hours and hours and hours reading forum posts and experimenting
with different code combinations but I can't get rid of the ~300ms delay
when an image is NOT found.

Thanks in advance for any wise words of wisdom!

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270582]: Problems setting Setting.WaitScanRate in Sikuli 1.0.1

2015-08-20 Thread joseytw
Question #270582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270582

Description changed to:
Hello,

I have searched the forums and while I have read posts that seem to
apply to the problem I am having, I can not nail down a workable
solution.  I am using Sikuli 1.0.1, and I am coding in Java on a Windows
7 machine.  I am also fairly new to coding in Java and using Sikuli.

My problem is this:

I have an array of 10 small images (10x15 pixles in size) that I iterate
through looking for a match using r.exists (the region is 12x17 pixels)
and when a match NOT found there seems to be a delay of ~300 ms before
the next check is made.

Here is the code:

int i =0;
for(Pattern p : pNumberArray){
if(r.exists(p.similar(.9f), 0) != null){
System.out.println(library.getTime() +  Image Found:  + p);
return i;
}
System.out.println(library.getTime() +  Image not found:  + p);
i++;
}

Here is the result when I run the above code.

12:19:01:032 Image not found 
12:19:01:365 Image not found 
12:19:01:698 Image not found
12:19:02:031 Image not found
12:19:02:364 Image not found 
12:19:02:697 Image not found

I was hoping using a 0 for (r.exists(p/similar(.9f), 0) would fix the
300ms delay problem but it does not.

I then read up on 'Settings.AutoWaitTimeout'
(https://answers.launchpad.net/sikuli/+question/251337) but ruled it out
as not applicable in my case.  As I understand it, using the 0 in
(r.exists(p/similar(.9f), 0) forces a one time check of the image and
immediately returns the match if found or NULL if not
(https://answers.launchpad.net/sikuli/+question/251337), so there should
be NO delay in a response whether an image is found or not.

Searching forum posts turned me on to 'Settings.ScanRate'
(https://answers.launchpad.net/sikuli/+question/194144) so I tried
setting 'Settings.WaitScanRate = 100;' so that it would search for a
match for no more than .01 seconds and return the result, but changing
that setting had no effect.  I also tried a variety of values including,
500, 1, .1f, and .01f but the results when running the code above was
always the same with ~300 ms delay.

So all that being said, that leads to my questions:
1) I assumed that setting the timeout to 0 when using exists on a region 
(r.exists(p/similar(.9f), 0) would result in NO delay in a response whether an 
image is found or not.  That is not the case.  Why is there a ~300 when the 
timeout is set to 0?

2) I assumed that setting 'Settings.WaitScanRate = 100;' would force a
search result at the end of .01 seconds.  It does not.  Am I missing
something about how this works?

3) One post I read mentioned that there used to be an issue setting the
values of Settings fields wouldn't work because the variables used a
'protected' modifier, but I can change the value and see the results of
modifying the value between 'Settings.MoveMouseDelay = 1;' and
'Settings.MoveMouseDelay = 0;' so that leads me to believe that I can
change the value of Settings fields.  Is the 'Settings.WaitScanRate'
indeed a protected variable and one that I cannot change?

I spent hours and hours and hours reading forum posts and experimenting
with different code combinations but I can't get rid of the ~300ms delay
when an image is NOT found.

Thanks in advance for any wise words of wisdom!

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270449]: App.close fails to close

2015-08-20 Thread Jeff_Vallis
Question #270449 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270449

Jeff_Vallis posted a new comment:
Tested
1.1.0(2015-08-20_01:00nightly)/Mac10.10.4/Java8(64)1.8.0_25-b17

App.close(TheApp) now works fine

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270581]: Report regarding failed scenarios

2015-08-20 Thread Sahil Dev
New question #270581 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270581

Using Sikuli, I create automated tests for my application.

NOw, when I run the test, the test might pass or fail.

1) For example, I might have a toggle unchecked in a test case, whereas my 
expected result is that the toggle should be checked.
2) Similarly, a button might be disabled wherein it should be enabled.

Does Sikuli automatically create a 'report' of such failed scenarios during a 
test run?

How does the user evaluate failed tests/ failed test scenarios?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270616]: How to clear the loaded images in sikuli

2015-08-20 Thread Naidu
New question #270616 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270616

Here is my following scenario.

I have to automate same tests in 4 different browsers.
I divided the images into 4 categories and all the images are with same name.
Each browser has a separate class  load the images in their respective 
directories.

ImagePath.add(Constants.IMG_DIR + browser);

When i run each browser tests individually everything went well.

The issue arise when i run all browser tests in a batch. because each browser 
folder contains the same image names, sikuli won't  load the images again.

Is there any reload Or unload methods available which can clear the cache of 
images that are already loaded in sikuli?

Or is there any other way which can be used to avoid these.

The last option is to rename the images, which is not an easy task for me as it 
involves good amount of changes.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270582]: What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 1.0.1, Java, Windows)

2015-08-20 Thread RaiMan
Question #270582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270582

Status: Open = Answered

RaiMan proposed the following answer:
-- yes, the problem is fixed in 1.1.0

--  (r.exists(p/similar(.9f), 0)
will return after the time needed to find p in r, which depends on the sizes of 
r and p

using a waittime of 0, lets the search always return after one try. So
in this case WaitScanRate is not relevant.

WaitScanRate defines how often the search is repeated during the
waittime, if waittime  0

Settings.WaitScanRate = 100;
would only make sense, if the search time in the average is less than 10 
millisecs (which only is the case with very small regions).
the standard WaitScanRate is 3. Higher values usually only lead to constant 
search, since the average search time is greater than the scan interval of some 
10 millisecs.
Constant search is very greedy, since it is plain number crunching.

You received this question notification because you are a member of
Sikuli Drivers, which 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 #270585]: Fundamental question on using Sikuli

2015-08-20 Thread Sahil Dev
Question #270585 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270585

Sahil Dev posted a new comment:
Thanks a million

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270587]: Launch Chrome in Mac : execution error: Can’t get application Chrome.

2015-08-20 Thread Naidu
New question #270587 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270587

Error Log:

[debug] RunTimeAPI: loadLib: libMacUtil.dylib
[debug] Runner: AppleScript:
#!/usr/bin/osascript
tell app Chrome to activate
returned:
*error*
/var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_1902161459/sikuli-859522232112186901.script:21:29:
 execution error: Can’t get application Chrome. (-1728)

[error] App.focus failed:  [-1:Chrome ()] Chrome
[debug] Region: ( ⌘ )  TYPE l
[debug] Region: ( ⌘ )  TYPE l
[debug] Region:  TYPE #ENTER.


Code Used: 

App ff = new App(chrome);
ff.focus();
screen.type(l, Key.CMD);
screen.wait((double) 3.0);
screen.type(l, Key.CMD);
screen.paste(link);
screen.type(Key.ENTER);

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270546]: Comparing texts between 2 versions of my application

2015-08-20 Thread Eugene Maslov
Question #270546 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270546

Eugene Maslov proposed the following answer:
Well, compare the tables with Python cell by cell.

content1 = open('d:/file1.txt', 'r').readlines() 
content2 = open('d:/file2.txt', 'r').readlines() 

different=0
for ln in range(len(content1)):
cells1=content1[ln].split()
cells2=content2[ln].split() 
for cell in range(len(cells1)):
if cells1[cell]cells2[cell]: 
different+=1
print cell +str(ln)+:+str(ln)+  is different

There is no need to use Sikuli functions for that. Sikuli just
conveniently extends the power of Python (or another applicable
language), making it able to see the screen and to act like a real user.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread RaiMan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

RaiMan proposed the following answer:
I just made some evaluation with 1.1.0.

Subclassing of Region on the Python scripting level is only possible if you 
either
1. do not use __init__ in your subclass
or
2. if you use __init__, you have to take care, that your Region object has 
valid pos (x,y) and dim (w,h) 

--- in case 1.
the standard constructors are available (which are implemented on the Java 
level only). If you need initialisation of your subclassed Region objects, you 
have to find another way for that, for example

reg = subRegion(region init parameters)
reg.init(your private parameters)

--- in case 2:
you have to implement an __init__ that accepts the standard Region init 
parameters (x,y,w,h or another Region object) and then use 
self.setROI(region init parameters)

to make your Region valid.

this is an example:

class XRegion(Region):

  def __init__(self, *args):
if len(args) == 1:
  self.setROI(args[0])
elif len(args) == 4:
  self.setROI(args[0], args[1], args[2], args[3])
else:
  self.setROI(SCREEN)
self.img = image.png

  def doFind(self):
m = self.find(self.img).highlight(2)
return m

print XRegion()
reg = XRegion(0,0,500,500)
print reg
reg = XRegion(reg)
print reg
reg = XRegion(reg.doFind())
print reg

prints:
R[0,0 1440x900]@S(0)[0,0 1440x900] E:Y, T:3.0
R[0,0 500x500]@S(0)[0,0 1440x900] E:Y, T:3.0
R[0,0 500x500]@S(0)[0,0 1440x900] E:Y, T:3.0
R[257,119 58x72]@S(0)[0,0 1440x900] E:Y, T:3.0

to add userargs to the constructor, you have to implement an __init__ like this:
  def __init__(self, *args, **userargs):

and handle the userargs keyword parameters accordingly

another maybe easier implementation is to use

  def __init__(self, *args):

and always use the first parameter as region init parameter as a list,
that either contains 4 values or 1 value or is empty. Of course you have
to adapt the handling in __init__ accordingly.

usage:
XRegion([], userparm1, userparm2)
reg = XRegion((0,0,500,500), userparm1, userparm2)
XRegion((reg,), userparm1, userparm2)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270582]: What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 1.0.1, Java, Windows)

2015-08-20 Thread joseytw
Question #270582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270582

joseytw gave more information on the question:
Ahhh geez, I just looked in the bug section.  I didn't think to check
there because I assumed it was working correctly.  It looks like this
was bugged in 1.0.1 and slated for fix in 1.1.0:

https://bugs.launchpad.net/sikuli/+bug/1241993

So I am guessing that is the problem right there... and after all of
these hours banging my forehead onto my desk if I had just checked one
last place (bugs) I would have had my answer.

 Le sigh.  :)

Just so I am clear, using a 0 for (r.exists(p/similar(.9f), 0) in
combination with 'Settings.WaitScanRate = 100;' (when it is working)
should make it so that a return is made in .01 seconds, correct?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270581]: Report regarding failed scenarios

2015-08-20 Thread RaiMan
Question #270581 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270581

Status: Open = Answered

RaiMan proposed the following answer:
SikuliX does not produce any reports.

As already stated more than once with your other questions: It is only
an API.

Repoting depends on your scripting/programming or the test tool you are
using (e.g. unittest, HTMLTestRunner, RobotFramework or whatever)

... please have a look at the docs.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270585]: Fundamental question on using Sikuli

2015-08-20 Thread RaiMan
Question #270585 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270585

Status: Open = Answered

RaiMan proposed the following answer:
at 1: yes

at 2: just start playing around with the SikuliX IDE to learn the basics
and understand how it works. Or look at the tons of examples in the net.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270546]: Comparing texts between 2 versions of my application

2015-08-20 Thread RaiMan
Question #270546 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270546

Status: Open = Answered

RaiMan proposed the following answer:
again: SikuliX does not have any of these compound features you are
looking for.

you have to use appropriate tools and/or script/program your needs.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270587]: Launch Chrome in Mac : execution error: Can’t get application Chrome.

2015-08-20 Thread RaiMan
Question #270587 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270587

Status: Open = Answered

RaiMan proposed the following answer:
Sorry, but Google is not consistent here:
the name of the process is Google Chrome, which is relevant for the App 
class, whereas in the menu it says Chrome.

This is true also for other apps, so you have to find out the process
name (which usually is the name shown with the dock symbol).

BTW: mentioned in the docs:
http://sikulix-2014.readthedocs.org/en/latest/interaction.html#starting-and-stopping-other-apllications-and-bring-them-to-front

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270585]: Fundamental question on using Sikuli

2015-08-20 Thread RaiMan
Question #270585 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270585

Status: Open = Answered

RaiMan proposed the following answer:
http://sikulix-2014.readthedocs.org/en/latest/index.html#tutorials-not-
yet-revised-for-version-1-1-0

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270599]: While testing a GUI if the script does not see an image it wait fail and the script stops.

2015-08-20 Thread RaiMan
Question #270599 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270599

Status: Open = Answered

RaiMan proposed the following answer:
for this one usually use something like unittest and pack each image test in an 
extra testcase.
each testcase then ends with an assert and the assert results (pass/fail) are 
reported in the test report.

with your usage of assert it simply stops if an assertion fails with an
assertion exception (which is the intention of this feature).

But assert simply is nothing else than a shortcut for something like
this (meta code):

if  not exists(#link_to_image#), 5):
throw an assertion exception
else:
do nothing and proceed

So if you do not want to use unittest (see faq 1804), then you have to
replace the asserts by something like this:

if  not exists(#link_to_image#), 5):
print NotFound: , #link_to_image#

so in case of not found you get the message and in any case the script
continues.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270581]: Report regarding failed scenarios

2015-08-20 Thread Sahil Dev
Question #270581 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270581

Status: Answered = Open

Sahil Dev is still having a problem:
Thank you very much,

Can you elaborate on 1), why do you say re-invent the wheel again?  I
did not get because I want to clearly understand why and how Robot
Framework helps.

Will read the 2a and 2b references, thanks again.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread RaiMan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

RaiMan proposed the following answer:
ok, I think I have a solution for use cases like yours:

I have added an init method to the Java level:

public void init(Region r) {
if (!r.isValid()) {
  return;
}
x = r.x;
y = r.y;
w = r.w;
h = r.h;
scr = r.getScreen();
otherScreen =r.isOtherScreen();
rows = 0;
autoWaitTimeout = r.autoWaitTimeout;
findFailedResponse = r.findFailedResponse;
throwException = r.throwException;
waitScanRate = r.waitScanRate;
observeScanRate = r.observeScanRate;
repeatWaitTime = r.repeatWaitTime;
}

- it does nothing if the Region object is not valid (has no screen or width or 
height is 0) (in the consequence, the Region is not valid and might produce 
errors/exceptions).
- with a valid Region object it copies the basic attributes from the given 
Region object

so in your case you have to say:

class BaseClass(Region):
def __init__(self, region, name):
self.init(region) 

reg = sikuli.Region(sikuli.screen())
baseClass = BaseClass(reg)

so you only in your BaseClass you have to replace the super().__init__()
call with the call  of init()

This works with tomorrows build.
I appreciate much, if you thoroughly test it.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270581]: Report regarding failed scenarios

2015-08-20 Thread RaiMan
Question #270581 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270581

Status: Open = Answered

RaiMan proposed the following answer:
--- Can you elaborate on 1), why do you say re-invent the wheel again?
If you want some test result reporting, then you might script/program this 
using some logging feature.

I think doing this, would be like re-inventing the wheel again,
because there are many, many testing tools and frameworks out there,
that can be used for that and most of them will easily allow to
integrate the usage of SikuliX features.

BTW: an example for using RFW with SikuliX 1.1.0 you can find here:
http://www.sikulix.com/support.html (Experimental: Play with Robot Framework)
To try this out you of course have to first setup SikuliX on your system.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270581]: Report regarding failed scenarios

2015-08-20 Thread RaiMan
Question #270581 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270581

Status: Open = Answered

RaiMan proposed the following answer:
at 1) surely not mandatory, but why invent the wheel again ;-)

at 2a) see faq 1804 for usage of unittest

at 2b) follow the link at the end of this faq, to read the by far most
popular blog post about RFW/Sikuli.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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] [Bug 1486838] Re: Documentation states dropAt has 2 args, only accepts one.

2015-08-20 Thread RaiMan
I have revised the docs

** Changed in: sikuli
   Status: New = Fix Released

** Changed in: sikuli
 Assignee: (unassigned) = RaiMan (raimund-hocke)

** Changed in: sikuli
Milestone: None = 1.1.0

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1486838

Title:
  Documentation states dropAt has 2 args, only accepts one.

Status in Sikuli:
  Fix Released

Bug description:
  The documentation for Region states:
  dropAt(PSMRL[, delay])
  Complete a drag-and-drop operation by dropping a previously dragged item at 
the given target click point.

  Parameters:   
  PSMRL – a pattern, a string, a match, a region or a location that evaluates 
to a click point.
  delay – time to wait after in seconds as decimal value

  However, adding the delay argument results in an error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1486838/+subscriptions

___
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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread Ryan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

Ryan posted a new comment:
Yes we are still talking 1.1.0 with the issue, sorry. I was describing
the existing way that Sikuli is launched in reference to the question
about using the .sikuli folder. In the case of finally switching to
1.1.0 that line would be changed, however I was only running my testing
through eclipse at this point.

I'm not sure why the traceback wouldn't correlate to 1.1.0 but I made sure to 
remove all of the existing sikuli data and re-install clean. I actually updated 
to the final release of Jython at the same time, so I know the jythonpath was 
cleared of old modules as well.
In that example I attempted to find the image before passing it off to the 
other object and it was successful, and printing the image/pattern within the 
object that is supposed to look for it showed the filepath.  I was even able to 
use the region itself within that object, but only when it was self.find(img) 
did it return that error.


What I have been doing is operating under the assumption that, except in 
special cases, an object will not be called without knowing it's region on the 
screen. For example, after creating a region containing a text box based some 
find operation, that region is passed into TextBox:

class TextBox(SomeSuperClass):
def __init__(region, name=TextBox):
@type region: Region
super(TextBox, self).__init__(region, name)
# Anything else the Text Box needs

def severalMethods():
do stuff

region is assumed to be a Region in some capacity and even if it is one
of my existing objects, type-hinting in the docstring helps assume it is
some kind of Region. Eventually there is a super class that instantiates
the region:

class BaseClass(Region):
def __init__(region, name, sikuli=sikuli, lookup=None, curDir=None):
super(BaseClass, self).__init__(region)
self.region=region # Actually wrapped in a property with a depreciation 
warning to keep backwards compatibility between our frameworks.

def methodsIHaveAbstracted():
do stuff


In the specific case of my issue, the constructor received it's own Region as 
region (and calls the init of the super providing this region) and then 
attempts to use the find method found through inheritance to search for this 
button. This is where I try self.region.find(img) or even just region.find(img) 
(should be the same anyway) and am able to find the region.

Are you saying that instead of the BaseClass using
super().__init__(region) it should be using Region.init(region)?


While reviewing what I wrote above I tried some things. I printed out 
self.getX() (and y, w, h) and received 0, 0 900, 1600 as expected (the region 
is the entire screen). I then tried to do self.highlight(3) on the next line 
and logged the following:
2015-08-20 08:49:04,789 DEBUG - __init__:60 - (type 
'java.lang.NullPointerException', java.lang.NullPointerException, traceback 
object at 0x2)

Sorry to keep at it, I'm just going to need to prepare a description of
what is and is not possible in the new version to my team so I want to
make sure I understand the changes and limitations. My goal was run
exactly what I have in place in 1.1.0 and see what breaks and then go
from there.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread RaiMan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

RaiMan posted a new comment:
Thanks for staying with this issue - very helpful.

I have to admit, that I was not aware of the problem.
Up to 1.0.1 there indeed was an __init__ in class Region at the Python level.

With version 1.1.0+ the class Region at the Python level is only still
there, to stay backwards compatible on 'with someRegion:' and the
support for the undotted usage of Region methods (which then are bound
automatically to the primary screen).

So to keep things simple for you and others, I am trying to understand your 
approach.
I am testing with the latest 1.1.0 using Jython 2.7

actual problem:

testing with

class BaseClass(Region):
def __init__(region, name, sikuli=sikuli, lookup=None, curDir=None):
super(BaseClass, self).__init__(region)

I get the error: 
[error] NameError ( global name 'self' is not defined )

which based on my Python understanding is inevitably

So what is your trick to have this working?

-- Are you saying that instead of the BaseClass using super().__init__(region) 
it should be using Region.init(region)?
this might be a possible solution, but a Region.init() does not exists yet.

You received this question notification because you are a member of
Sikuli Drivers, which 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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread Ryan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

Ryan posted a new comment:
Oh my gosh, I'm sorry... I forgot to put in the self parameters for the
def statements. I have Eclipse set up to do that for me so I haven't
typed self as a parameter in a really long time.

class BaseClass(Region):
def __init__(self, region, name):
super(BaseClass, self).__init__(region)

reg = sikuli.Region(sikuli.screen())
baseClass = BaseClass(reg)

It would look like this.  you can omit sikuli (that is just passing the
sikuli wrapper we created with helper functions), and the lookup (secret
:) ). curDir is just used to provide a working directory to any images
that may be called in any of the class levels. I just included them for
the context of more being included at that level, but they can just be
omitted for a simplest working example. In the example I also included
the way I am getting the screen's Region for completeness.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270608]: Sikuli running the operating system Windows Server 2008

2015-08-20 Thread Eduardo
New question #270608 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270608

Has anyone had trouble running test cases with Sikuli in Windows Server 2008?

To be more specific, the problems I / O ?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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 #270582]: What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 1.0.1, Java, Windows)

2015-08-20 Thread joseytw
Question #270582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270582

Status: Answered = Solved

joseytw confirmed that the question is solved:
Thanks RaiMan, that solved my question.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly

2015-08-20 Thread Naidu
Thanks Raiman.
I am able to solve it by keeping a slight delay of 2-3 seconds after i quit 
safari  before i re-open it again

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1485975

Title:
  Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated 
  Test suite stops abruptly

Status in Sikuli:
  New

Bug description:
  Below is the error log:
  I am using java+maven+1.1.0 sikuli version.
  In my code, before every test case, i start the safari browser, do something 
 close the browser.
  When i run the test cases individually, i am facing no issues.
  But when i run it as a suite, safari is getting terminated  tests are unable 
to proceed further.

  Below is the log:

  [debug] Runner: AppleScript:
  #!/usr/bin/osascript
  tell application System Events
  set found to NotFound
  try
  set found to first item of (processes whose name is safari)
  end try
  end tell
  if not found is equal to NotFound then
  set windowName to 
  try
  set windowName to name of first window of application (name of found)
  end try
  set found to {name of found, «class idux» of found, windowName}
  end if
  found

  returned:
  *error*
  
/var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347:
 execution error: System Events got an error: Can’t get application process 
Safari. (-1728)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions

___
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 #270538]: Is there a way to remove the sikuli import feature in the nightly build?

2015-08-20 Thread Ryan
Question #270538 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270538

Ryan posted a new comment:
Yes that is correct.  Sorry, I was referring to your comment if I could
thoroughly test it. I was just saying I'm  not sure what to even test
beyond what I am currently doing.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which 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