looks like an extra Click being added by IDE during loop --- definitely no
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi,
the following script is designed to loop through a menu item until it fins the one it is looking for and when it does it stops the loop and is supposed to click a confirm button which takes the screen to another page. However what is happening is that the IDE finds the correct option but adds another click which takes the menu on to the next option before it clicks confirm which means it is confirming the wrong item. In the log file the extra click does not seems to be recorded but it does happen. Below is the code snippet and the logfile with debug(3) set. As far as I can tell the code logic is sound but if there is a problem with it which is causing the extra click please point it out. The code is looking for "BMW 2002 TURBO" but it is find that and then clicking on:
try:
while found == 0:
if current_model == find_model:
elif current_model == "ANY":
except:
print("Caught exception ")
The debug output is:
.... more ...
[debug] highlight R[1157,402 233x37]@S(0) for 2.0 secs
('M is -->', 'BMW |')
('Storecar is -->', 'BMW')
exact match
[debug] DOUBLE CLICK on L[1273,420]@S(0) (558 msec)
[debug] Image: reused: 1576019906865.png (file:C:
[debug] Region: wait: waiting 3.0 secs for 1576019906865.png to appear in R[0,0 1680x1050]@S(0)
....
[debug] Region: wait: 1576019906865.png appeared (M[788,457 56x32]@S(0) S:0.99 C:816,473 [510 msec])
[debug] CLICK on L[816,473]@S(0) (523 msec)
[debug] Finder2: makeMat: INT_RGB (223x36)
[debug] Image: reused: 1576020708907.png (file:C:
[debug] Region: wait: waiting 3.0 secs for 1576020708907.png to appear in R[0,0 1680x1050]@S(0)
About to click
....
[debug] Region: wait: 1576020708907.png appeared (M[789,451 44x43]@S(0) S:0.93 C:811,472 [167 msec])
clicking
[debug] CLICK on L[811,472]@S(0) (527 msec)
[debug] Finder2: makeMat: INT_RGB (223x36)
('Did Not Find -->', 'BMW 2002 TURBO')
The IDE version is 2.0.1 running on Windows 10 64 bit Version 10.0.18362 Build 18362
It looks like you are moving some menu by 1576020708907. png")
print("About to click")
click("
print("clicking")
under a constant region
model_region
might be, that the
model_region.text()
comes too fast.
try so: 1576020708907. png")
click("
wait(1)
current_model = model_region.text()