← Back to team overview

sikuli-driver team mailing list archive

[Bug 1856450] Re: looks like an extra Click being added by IDE during loop --- definitely no

 

a recording does not help, to track down the reason.

You have to isolate the offending part of the script into an extra
script without any loops and then try to find the reason by getting
nearer step by step.

You might also try another approach, to move through the menu.

Be aware: right click on the column number in the IDE allows to run only
parts of a script.

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

Title:
  looks like an extra Click being added by IDE during loop ---
  definitely no

Status in Sikuli:
  New

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:
                print("About to click")
                click("1576020708907.png")
                print("clicking")
                current_model = model_region.text()
                wait(1)

                if current_model == find_model:
                      print("Found It")
                      found = 1
                      print ("Found is = ",found)
                      click("1576403393174.png")
                      break
                      # wait(5)

                elif current_model == "ANY":
                      print("Did Not Find -->",find_model)
                      break
  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:\Users\mmcguinn\Documents\Mensel.sikuli\1576019906865.png)
  [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:\Users\mmcguinn\Documents\Mensel.sikuli\1576020708907.png)
  [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

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


References