Re: [Sikuli-driver] [Question #665137]: Object orientation in Python scripts

2018-03-03 Thread CCIOLA
Question #665137 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665137

Status: Answered => Open

CCIOLA is still having a problem:
Hi @RaiMan,

Here is the thing: I need to test a complex desktop application that
runs in Delphi and the only way to automate this test is using SikuliX.
Other softwares, like Winium, did not work for me.

I will have to use OO to separete the alternative fluxes of this
application in classes (a bunch!), calling the methods when needed.

I've been looking on many websites and reunited on this script what I
thought it would be the closest way to do this.

Comments with ">>":

--- main.py
import shutil
#from geraCPF import geraCPF
import geraCPF # just so >> if I do this, it does not work for me.

#class main(): # does not makes sense and the implementation is not
Python-like >> ok.

myApp = App("Chrome")
App.open("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe")
myApp.focus()
while not exists("1520001990649.png"):
   observe() # not sure, what this should do??? >> it's an implicit wait: while 
the image.png does not appear, SikuliX just 'observe' and keep running without 
doing nothing.
   wait(1)
click("1520001996809.png")
type(geraCPF.cpf_funcional_func()) # the function returns str() anyway >> ok.
# you have to say module.function() >> not sure if it will work, I'll try.
wait(1)
#exit() # not needed >> I have to exit from the script execution and return to 
SikuliX.

-- 
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 #665137]: Object orientation in SikuliX

2018-03-02 Thread CCIOLA
New question #665137 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665137

Hi, 

Is it possible to do object orientation in SikuliX? I am trying to do a main 
file get a method from another file but it's not working. 

main.py
- - - 

import shutil
from geraCPF import geraCPF 

class main():
   myApp = App("Chrome")
   App.open("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe")
   myApp.focus()
   while not exists("1520001990649.png"):
  observe()
  wait(1)
   click("1520001996809.png")
   type(str(cpf_funcional_func()))
   wait(1)
   exit()


geraCPF.py
- - - 

import random

class geraCPF():
   def __init__(self):
  def cpf_funcional_func(self): 

  n = [random.randrange(10) for i in xrange(9)] 
   
  
  s = sum(x * y for x, y in zip(n, range(10, 1, -1)))
  d1 = 11 - s % 11
  if d1 >= 10:
  d1 = 0
  n.append(d1)  
  
  
  s = sum(x * y for x, y in zip(n, range(11, 1, -1)))
  d2 = 11 - s % 11
  if d2 >= 10:
  d2 = 0
  n.append(d2)  
   
  return "%d%d%d%d%d%d%d%d%d%d%d" % tuple(n)


-- 
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 #664859]: Jython cheat sheet

2018-03-01 Thread CCIOLA
Question #664859 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/664859

CCIOLA posted a new comment:
Thanks for the concern! :)

-- 
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 #664859]: Jython cheat sheet

2018-03-01 Thread CCIOLA
Question #664859 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/664859

CCIOLA posted a new comment:
Thanks @podolyan-roman, @RaiMan, it could really help who is starting as
a quick guide/reference.

-- 
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 #664859]: Jython cheat sheet

2018-03-01 Thread CCIOLA
Question #664859 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/664859

Status: Answered => Open

CCIOLA is still having a problem:
Hi,

I'm looking for a list or summary of the commands most applied on
SikuliX, explaining what each one do, for instance:

wait() - waits for a time specified in seconds.
shutil.move() - moves the archive to a folder.
myApp.focus() - keeps the focus on a specific window.
type() - puts a string or type a specific key from keyboard.
popup() - shows a popup message.

[...] among others.

-- 
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 #664859]: Jython cheat sheet

2018-02-26 Thread CCIOLA
Question #664859 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/664859

Status: Answered => Open

CCIOLA is still having a problem:
Looking for Python does not help my need...

-- 
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 #664859]: Jython cheat sheet

2018-02-23 Thread CCIOLA
New question #664859 on Sikuli:
https://answers.launchpad.net/sikuli/+question/664859

Hi, do you know some Jython cheat sheet, listing the main commands? I am 
looking for something like this, but of Jython:

https://thoughtbot.com/upcase/test-driven-rails-resources/capybara.pdf

[]s

-- 
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] [Bug 1183671] Re: [1.0.1 ok] Observe: does not work anymore after success when used the second time on same region

2017-01-20 Thread CCIOLA
--- finally fixed with 1.0.1
the problem is fixed with
Sikuli-1.0.0-SupplementalObserveOnlyOnce from the download page

---

Please, where exactly I can find this fix? I'm having the problem with
version 1.1.0 downloaded this week from
https://launchpad.net/sikuli/sikulix/1.1.0 , cannot download 1.1.1. yet
from where I am.

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

Title:
  [1.0.1 ok] Observe: does not work anymore after success when used the
  second time on same region

Status in Sikuli:
  Fix Committed

Bug description:
  --- finally fixed with 1.0.1

  the problem is fixed with

  Sikuli-1.0.0-SupplementalObserveOnlyOnce from the download page

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1183671/+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 #443121]: Error on upgrade to version 1.1.0 - Windows 7

2017-01-19 Thread CCIOLA
Question #443121 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/443121

Status: Answered => Solved

CCIOLA confirmed that the question is solved:
RaiMan, I let this question opened here because I'm still having
problems with upgrade!

Reported 1.1.1 issue on GitHub to other people follow the issue.

Closing this question.

-- 
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 #443121]: Error on upgrade to version 1.1.0 - Windows 7

2017-01-19 Thread CCIOLA
Question #443121 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/443121

CCIOLA posted a new comment:
I was with a problem with my permissions on internet, got the correct
files downloading at home, but had a problem with version 1.1.1 .

At starting Sikuli, the command window shows this message and closes
Sikuli automatically. Reported this issue on
https://github.com/RaiMan/SikuliX-2014/issues/214

Will stay on version 1.1.0 till this issue be solved.

-- 
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 #443121]: Error on upgrade to version 1.1.0 - Windows 7

2017-01-18 Thread CCIOLA
Question #443121 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/443121

Status: Answered => Open

CCIOLA is still having a problem:
Hi Vadivelan,

Already did the download of  sikulixsetup-1.1.0.jar  file and placed it
on a new folder, but the download doesn't work either, so I'll have to
do it manually.

Thanks for the link to jython. Where can I download the files above?

sikulixlibswin-1.1.0.jar
sikulixsetupIDE-1.1.0-forsetup.jar
sikulixsetupAPI-1.1.0-forsetup.jar

-- 
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 #443121]: Error on upgrade to version 1.1.0 - Windows 7

2017-01-18 Thread CCIOLA
New question #443121 on Sikuli:
https://answers.launchpad.net/sikuli/+question/443121

I want to upgrade my 1.0.1 version to 1.1.0, but setup is not downloading the 
files. 

Got this popup message:

---
Some of the downloads did not complete sucessfully.
Check the logfile for possible error causes.

If you think sstup's inline download is blocked somehow on your system, you 
migth download the appropriate raw packages manually into the folder Downloads 
in the setup folder and run setup again.

download page: https://lauchpad.net/raiman/sikulix2013+/1.1.0
files to download (information is in the setup log file too)

sikulixlibswin-1.1.0.jar
sikulixsetupIDE-1.1.0-forsetup.jar
sikulixsetupAPI-1.1.0-forsetup.jar
jython-standalone-2.7.0.jar
---

And this is my log archive:

---
[debug (18/01/17 09:33:56)] Debug: setLogFile: C:\Program Files (x86)\Sikuli 
X\Sikuli 1.1.0\SikuliX-1.1.0-SetupLog.txt
[debug (18/01/17 09:33:56)] RunSetup: ... starting with no args given
[debug (18/01/17 09:33:56)] RunSetup: Setup: 1.1.0 2015-10-06_17:22 in folder:
C:\Program Files (x86)\Sikuli X\Sikuli 1.1.0
[debug (18/01/17 09:33:56)] RunSetup: RunningSystem: Windows 6.1
[debug (18/01/17 09:33:56)] RunSetup: parent of jar/classes: C:\Program Files 
(x86)\Sikuli X\Sikuli 1.1.0
[debug (18/01/17 09:33:56)] RunSetup: RunningJava: Java 8 (amd64) 1.8.0_111-b14
[debug (18/01/17 09:33:56)] init user preferences
[debug (18/01/17 09:33:59)] RunSetup: 
popAsk: 
The following file(s) will be downloaded to
C:\Program Files (x86)\Sikuli X\Sikuli 1.1.0
--- Native support libraries for Windows (sikulixlibs...)
--- Package 1 ---
sikulixsetupIDE-1.1.0-forsetup.jar (IDE/Scripting)
sikulixsetupAPI-1.1.0-forsetup.jar (Java API)
 - with Jython
Only click NO, if you want to terminate setup now!
Click YES even if you want to use local copies in Downloads!

[debug (18/01/17 09:34:03)] FileManager: Downloading sikulixlibswin-1.1.0.jar 
with unknown size
[error (18/01/17 09:34:03)] FileManager: problems while downloading
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
[debug (18/01/17 09:34:07)] FileManager: Downloading 
sikulixsetupAPI-1.1.0-forsetup.jar with unknown size
[error (18/01/17 09:34:07)] FileManager: problems while downloading
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
[debug (18/01/17 09:34:11)] FileManager: Downloading 
sikulixsetupIDE-1.1.0-forsetup.jar with unknown size
[error (18/01/17 09:34:11)] FileManager: problems while downloading
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
[debug (18/01/17 09:34:14)] RunSetup: 
popAsk: 
If you click YES, you will get Jython version 2.7.0 (recommended)
... but there is an issue with some rare UTF-8/Unicode situations,
that usually appear on startup with UTF-8 ccharacters
somewhere in the system environment
If you encounter such problems with Jython 2.7.0
run setup again and
click NO to get Jython 2.5.4rc1

[debug (18/01/17 09:34:20)] FileManager: Downloading 
jython-standalone-2.7.0.jar with unknown size
[error (18/01/17 09:34:20)] FileManager: problems while downloading
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
[debug (18/01/17 09:34:23)] RunSetup: Download ended
[debug (18/01/17 09:34:23)] RunSetup: Downloads for selected options:
sikulixlibswin-1.1.0.jar sikulixsetupIDE-1.1.0-forsetup.jar 
sikulixsetupAPI-1.1.0-forsetup.jar jython-standalone-2.7.0.jar 
[debug (18/01/17 09:34:23)] RunSetup: 
popError: 
Some of the downloads did not complete successfully.
Check the logfile for possible error causes.
If you think, setup's inline download is blocked somehow on
your system, you might download the appropriate raw packages manually
into the folder Downloads in the setup folder and run setup again.
download page: https://launchpad.net/raiman/sikulix2013+/1.1.0
files to download (information is in the setup log file too)
sikulixlibswin-1.1.0.jar
sikulixsetupIDE-1.1.0-forsetup.jar
sikulixsetupAPI-1.1.0-forsetup.jar
jython-standalone-2.7.0.jar
Be aware: The raw packages are not useable without being processed by setup!
For other reasons, you might simply try to run setup again.

---

I have internet connection, nothing is blocking the download.

What's 

Re: [Sikuli-driver] [Question #441903]: Does onAppear() has a minimun default time?

2017-01-17 Thread CCIOLA
Question #441903 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/441903

Status: Answered => Solved

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

-- 
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 #441903]: Does onAppear() has a minimun default time?

2017-01-17 Thread CCIOLA
New question #441903 on Sikuli:
https://answers.launchpad.net/sikuli/+question/441903

I'm trying to write an instruction to wait for an image appear on the screen, 
but sometimes my aplication takes too long to show the image, sometimes shows 
it on a shor period of time.

I'm using

  onAppear(myImage.png, myFunction())

but when my image takes a long time to to be shown, it seems like onAppear has 
a default waiting time to work, so it breaks the execution before the image be 
found on the screen.

I've tried to use while, but it doesn't work like I explained above:

 while not find(myImage.png)
 sleep(FOREVER)

Do you know how can I do to wait for 20 seconds for the image, for example, and 
break the waiting as soon the image appears?


-- 
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 #340219]: How to use Alt-PrintScreen keys on capture(Screen()) command?

2016-08-12 Thread CCIOLA
Question #340219 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/340219

Status: Answered => Solved

CCIOLA confirmed that the question is solved:
Thanks, masuo!  Worked pretty good!

firstWindow = App.focusedWindow()
firstWindow.highlight(2)

def captureImage(): 

captureScreenshot = shutil.move(capture(firstWindow), screenshotsDirectory 
+ 'AppVdlkAndroid_' + (str(int(numPrint))) + '.png')

-- 
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 #295628]: How to use Unit Test tool in Sikuli?

2016-06-24 Thread CCIOLA
Question #295628 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295628

Status: Answered => Solved

CCIOLA confirmed that the question is solved:
Well the unit test menu entry is still available.. but I guess it's
because of the version I have. I'll try to doenload another .exe.

Thanks!

-- 
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 #295628]: How to use Unit Test tool in Sikuli?

2016-06-24 Thread CCIOLA
Question #295628 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/295628

Status: Answered => Open

CCIOLA is still having a problem:
Sikuli X-1.0rc3 (r905) isn't the latest version?

Downloaded the sikulixsetup-1.1.0.jar, putted it on a separated folder
and installed the pack 1, but nothing changed. What is missing?

-- 
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 #295628]: How to use Unit Test tool in Sikuli?

2016-06-24 Thread CCIOLA
New question #295628 on Sikuli:
https://answers.launchpad.net/sikuli/+question/295628

Hi, 

I'd like to know how to use the "Unit Test" tool in Sikuli (that one found 
inside the "View" menu).

Is this options really useful?

-- 
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 #196436]: Suddenly Sikuli IDE stop working, while launching IDE it hangs on.

2016-06-15 Thread CCIOLA
Question #196436 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/196436

CCIOLA posted a new comment:
@RaiMan, sorry about that...

My Sikuli version is r930.

I let it trying to run all night long, and from yesterday till today it
finally worked!! I don't know what happend...

Yesterday I uninstalled Ruby and Cucumber, but don't know if the gems
installed with Ruby were uninstalled too with the process.

Sikuli working again, thanks for the concern :)

-- 
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 #196436]: Suddenly Sikuli IDE stop working, while launching IDE it hangs on.

2016-06-14 Thread CCIOLA
Question #196436 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/196436

CCIOLA posted a new comment:
Hi, please help...

Sikuli opens its window, but when I try to open an existing project or I
try to type something on the source code area, it stops working. I
cannot even play the latest script opened, the play button simply doen't
work.

Any ideas??

The only thing I did was install Ruby and Cucumber on my PC. I also
executed some commands on command window to get the latest Ruby's gems,
that's all.

I restarted the machine, and also re-installed Java jre-
6u37-windows-i586 and Sikuli itself.

-- 
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