sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52094
Re: [Bug 1833356] Re: [1.1.3] findAll fails but image exists
The screen.
This could contain a close button or many close buttons if a pop up
window called another pop up window hence the code if exists find them all
and keep closing till the pop ups are gone or in the actual code it has
tried 20 times to prevent an infinite loop.
The problem.
Exists finds a match. The match it finds is on the screen it’s not
a close button it’s a % which in pixels must be very similar.
You can see from the test code that I wrote that I found what it
was matching by using find which also found the match and positioning the
cursor at that position. After which I did a pop up to see the match and
then it did the findall which crashes
On Wed, Jun 19, 2019 at 9:01 AM RaiMan <sikulix@xxxxxxxxxxx> wrote:
> the screen shot does not contain any close button.
>
> ** Summary changed:
>
> - findAll Fails
> + [1.1.3] findAll fails but image exists
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1833356
>
> Title:
> [1.1.3] findAll fails but image exists
>
> Status in Sikuli:
> New
>
> Bug description:
> Code
> def Find_All_Close_X(v_Image):
> if exists(v_Image,0.2):
> v_Pos = find(v_Image)
> print "v_Pos",v_Pos
> hover(Location(v_Pos.x,v_Pos.y))
> print "hovering",v_Pos.x,v_Pos.y
> popup("Found and hovering")
> v_Result = findAll(v_Image)
> else:
> print "Not Found"
> v_Image_p = "/home/jeff/SikuliScripts_Linux/Subs/Vikings/Close X big
> Region.png"
> sx = 422 ; sy = 132 ; sw = 505 ; sh = 270
> setRect(sx,sy,sw,sh)
> g_Find_Matching = 0.85
> for i in range(20):
> print "^ " * 40 ,"Try", g_Find_Matching
> v_Image = Pattern(v_Image_p).similar(g_Find_Matching)
>
> Find_All_Close_X(v_Image)
> g_Find_Matching = g_Find_Matching - 0.01
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sikuli/+bug/1833356/+subscriptions
>
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1833356
Title:
[1.1.3] findAll fails but image exists
Status in Sikuli:
Opinion
Bug description:
Code
def Find_All_Close_X(v_Image):
if exists(v_Image,0.2):
v_Pos = find(v_Image)
print "v_Pos",v_Pos
hover(Location(v_Pos.x,v_Pos.y))
print "hovering",v_Pos.x,v_Pos.y
popup("Found and hovering")
v_Result = findAll(v_Image)
else:
print "Not Found"
v_Image_p = "/home/jeff/SikuliScripts_Linux/Subs/Vikings/Close X big Region.png"
sx = 422 ; sy = 132 ; sw = 505 ; sh = 270
setRect(sx,sy,sw,sh)
g_Find_Matching = 0.85
for i in range(20):
print "^ " * 40 ,"Try", g_Find_Matching
v_Image = Pattern(v_Image_p).similar(g_Find_Matching)
Find_All_Close_X(v_Image)
g_Find_Matching = g_Find_Matching - 0.01
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1833356/+subscriptions
References