Re: [Sikuli-driver] [Question #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread Kogul
Question #693582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693582

Status: Answered => Open

Kogul is still having a problem:
Thanks for the reply, I like to give you a clear picture.

In my application, the text changes dynamically on the screen. the text
I need to capture is Success and failure. If the application works,
success text will appear on the screen/app, if the application crashed,
failure text will appear on the screen/app. The challenge here am facing
is I need to wait for the (Success/Failure) text to capture and write
the steps in the log. The challenge here is I'm not sure about the exact
time for the text to appear on the screen/app. Either Success or failure
text will appear on the screen so I used the below code using the If
condition.

if(screen.exists("statusCompleted.png",3600)!=null){
System.out.println("project created successful");
}

else if(screen.exists("failed.png",3600)!=null){
System.out.println("project created was unsuccessful");
}

The issue here I faced is if the application succeeds, the Sikuli is
waiting until the (success )text is visible & entered into the if
condition and I can print the  System.out.println("project created
successfully");  but if the application crashed the control remains in
the If condition and waiting for 3600 seconds and the control not moving
to else if part. I don't need to be a wait if the text is not present on
the screen.

I need a solution to break this barrier. my concern is as soon as the
image is not present in if condition, the control should change to else
condition

-- 
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 #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread masuo
Question #693582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693582

Status: Open => Answered

masuo proposed the following answer:
if set zero to  second parameter of "exists", "exists" return without wait.
#1 example "If you want to check in sequence at that moment"
#1 example "If you want to check continuously for 3600 seconds"

-- 
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 #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread Kogul
Question #693582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693582

Status: Answered => Open

Kogul is still having a problem:
Thanks for the reply, but it did not solve my problem. The script should
dynamically wait for a text, as soon as the text visible on the screen,
the control should change to if or else if, that's my concern. If I use
the above code first it waits for 3600 seconds and checking the else if
condition.

-- 
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 #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread masuo
Question #693582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693582

Status: Open => Answered

masuo proposed the following answer:
I'm not using Java.
Please read javadoc.
https://raiman.github.io/SikuliX1/javadocs/org/sikuli/script/Region.html#findAny(java.lang.Object...)

-- 
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 #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread Kogul
Question #693582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693582

Status: Answered => Open

Kogul is still having a problem:
Can you please write it in java?  Am using sikuli api in eclipse, using
java  as a programming language

On Thu, 22 Oct, 2020, 11:05 pm masuo, 
wrote:

> Your question #693582 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/693582
>
> Status: Open => Answered
>
> masuo proposed the following answer:
> If you want to determine whether image A or image B exists at that moment
> imagelist = [imageA, imageB]
> mm = findAny(imagelist)
> for m in mm:
> print m.getIndex()
>
>
> https://sikulix-2014.readthedocs.io/en/latest/region.html#findmorethanoneimage
>
> If you want to check in sequence at that moment
> if exists(imageA, 0):
> print "imageA is found"
> elif exists(imageB, 0):
> print "imageB is found"
>
>
> If you want to check continuously for 3600 seconds
> t = 3600
> while t > 0:
> if exists(imageA, 0):
> print "imageA is found"
> elif exists(imageB, 0):
> print "imageB is found"
> wait(10)
> t = t - 10
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/693582/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/693582
>
> You received this question notification because you asked the 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 #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread masuo
Question #693582 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693582

Status: Open => Answered

masuo proposed the following answer:
If you want to determine whether image A or image B exists at that moment
imagelist = [imageA, imageB]
mm = findAny(imagelist)
for m in mm:
print m.getIndex()

https://sikulix-2014.readthedocs.io/en/latest/region.html#findmorethanoneimage

If you want to check in sequence at that moment
if exists(imageA, 0):
print "imageA is found"
elif exists(imageB, 0):
print "imageB is found"


If you want to check continuously for 3600 seconds
t = 3600
while t > 0:
if exists(imageA, 0):
print "imageA is found"
elif exists(imageB, 0):
print "imageB is found"
wait(10)
t = t - 10

-- 
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 #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

2020-10-22 Thread Kogul
New question #693582 on Sikuli:
https://answers.launchpad.net/sikuli/+question/693582

I would like to know, is there any way to wait for an element until the element 
is visible. In selenium, there is a concept called Explicit wait. In that 
concept, the user won't give the input's like seconds, minutes, hours to wait 
for an element.  It automatically searches for a particular element. I like to 
know is there is any way without entering the wait time, the wait should be 
automatically elongated until the element or text is visible. 

Please find the below example in which I'm getting struck:

if(screen.exists("statusCompleted.png",3600)!=null){
System.out.println("project  created successful");
}

else if(screen.exists("failed.png",3600)!=null){
System.out.println("project created was unsuccessful");
}

>From the above code, the problem here am facing here is, If the test run 
>fails, the control doesn't come to the else if part, first if the part is 
>getting waiting/searching for a status-completed image for 3600 sec and then 
>the control comes to else if. 

My expectation is if the status-completed is not seen on the screen, the next 
second the control should come to the else if part. Is there any solution or 
workaround for this scenario? Please help.





-- 
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 #693580]: Can't findText() with special character

2020-10-22 Thread masuo
Question #693580 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693580

Status: Open => Answered

masuo proposed the following answer:
literal strings must be surrounded by u" and ".

[example]
m = findText(u"é")
if m:
m.highlight(1)

-- 
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 #693580]: Can't findText() with special character

2020-10-22 Thread Ben
New question #693580 on Sikuli:
https://answers.launchpad.net/sikuli/+question/693580

Hello, so I'm trying to use findText() for a program, it work fine on words 
without special character, but when I try to find text with special character 
like é or è or à (for french words), it crash and do a traceback with a find 
failed.

I have OcrLanguage = Fra but it doesn't change anything.

Do you know if there is a solution ? 

I was thinking about trying to find parts of the words without special 
character but it will be tedious for the rest of my program.

Thank you for your work on sikulix, hope we can find a solution ! 



-- 
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 #693577]: runing a sikuli script from remote desktop throws back this error: [error] Location: outside any screen

2020-10-22 Thread reda benslal
Question #693577 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693577

Description changed to:
i usually was able to run scripts smoothly on a remote desktop from my
local machine, but recently i started receiving errors ([error]
Location: outside any screen (843694960, 0) - subsequent actions might
not work as expected) everytime i launch the scripts and minimize or
close the remote connection afterwards, which i assume refer to failiure
to detect images due to them being outside the detection area.

i looked up this error message and found out that someone had trouble with the 
same thing on a sikuli 1.0.1 
(https://answers.launchpad.net/sikuli/+question/235809 ) and that all what they 
had to do was to detele sikuli sub branches from 
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\ . so i did, and restarted the 
machine, but the problem was still there.
i also thaught that maybe deleting the sub registery and restarting the machine 
should't have been done remotely (it might result in having the wrong settings 
saved for that sub-reg), so i had someone do it the normal way, but there was 
no improvement.

im running on a Sikuli 2.0.4 on java 8
please if there was somthing i missed or i can do that can help with my 
situation, let me know

-- 
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 #693577]: runing a sikuli script from remote desktop throws back this error: [error] Location: outside any screen

2020-10-22 Thread reda benslal
New question #693577 on Sikuli:
https://answers.launchpad.net/sikuli/+question/693577

i usually was able to run scripts smoothly on a remote desktop from my local 
machine, but recently i started receiving errors ([error] Location: outside any 
screen (843694960, 0) - subsequent actions might not work as expected) which i 
assume refer to failiure  to detect images due to them being outside the 
detection area.

i looked up this error message and found out that someone had trouble with the 
same thing on a sikuli 1.0.1 
(https://answers.launchpad.net/sikuli/+question/235809 ) and that all what they 
had to do was to detele sikuli sub branches from 
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\ . so i did, and restarted the 
machine, but the problem was still there.
i also thaught that maybe deleting the sub registery and restarting the machine 
should't have been done remotely (it might result in having the wrong settings 
saved for that sub-reg), so i had someone do it the normal way, but there was 
no improvement.

im running on a Sikuli 2.0.4 on java 8
please if there was somthing i missed or i can do that can help with my 
situation, let me know  

-- 
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 #693497]: IntelliJ IDEA artifact.jar and ImagePath

2020-10-22 Thread RaiMan
Question #693497 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693497

Status: Open => Needs information

RaiMan requested more information:
Yes, send me the stuff zipped to sikulix---at---outlook---dot---com

-- 
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 #693575]: The number of GUI 'pop-ups' supported in Sikuli is

2020-10-22 Thread masuo
Question #693575 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693575

masuo proposed the following answer:
Document about popup is here.
https://sikulix-2014.readthedocs.io/en/latest/interaction.html?highlight=popup

-- 
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 #693575]: The number of GUI 'pop-ups' supported in Sikuli is

2020-10-22 Thread masuo
Question #693575 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693575

Status: Open => Answered

masuo proposed the following answer:
Document about popup is here.
https://sikulix-2014.readthedocs.io/en/latest/interaction.html?highlight=popup

-- 
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 #693575]: The number of GUI 'pop-ups' supported in Sikuli is

2020-10-22 Thread Binay Sarangi
New question #693575 on Sikuli:
https://answers.launchpad.net/sikuli/+question/693575

how many GUI 'pop-ups' supported in Sikuli

-- 
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 #693505]: java multithreading is not parallel

2020-10-22 Thread Jaroslav Novotny
Question #693505 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693505

Status: Answered => Solved

Jaroslav Novotny confirmed that the question is solved:
I distilled my code to the smallest working example: 
https://notepad.pw/code/g105vjx1b
And got output that I'd expect:

Test 1 took: 432 ms
Test 2 took: 118 ms
Test 3 took: 168 ms

I'll keep investigating but looks like problem is somewhere else, most
likely between keyboard and chair, so I'll close this as 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 #693497]: IntelliJ IDEA artifact.jar and ImagePath

2020-10-22 Thread Jaroslav Novotny
Question #693497 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693497

Status: Answered => Open

Jaroslav Novotny is still having a problem:
I made a new project just to investigate, got some new info. I was
hoping it was conflict in the "main" name, but looks like something
else.

This is the code:

import org.sikuli.script.*;
public class SikuliTest {
public static void main(String[] args) {
boolean path_add_success = ImagePath.add("SikuliTest/patterns/");
System.out.printf("SikuliTest/patterns/ added?: %s" + "\n", 
path_add_success);
for (ImagePath.PathEntry path : ImagePath.getPaths()) {
System.out.printf("ImagePath: %s\n", path);
}
Pattern pattern = new Pattern("pattern.png");
}
}

When running from IntelliJ all is fine. When from this .jar (unzipped
structure: https://i.imgur.com/kILFr1e.png) I get output:

e:\.\Sikuli_Test_jar>java -jar Sikuli_Test.jar
SikuliTest/patterns/ added?: true
ImagePath: null
ImagePath: null
[error] Image: load: failed: jar:file: 
/E:/.../out/artifacts/Sikuli_Test_jar/Sikuli_Test.jar!/patterns//pattern.png

Weirdly the "/" gets doubled.

-- 
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 #693497]: IntelliJ IDEA artifact.jar and ImagePath

2020-10-22 Thread Jaroslav Novotny
Question #693497 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693497

Jaroslav Novotny posted a new comment:
I can provide this test project and .jar if needed.

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