← Back to team overview

sikuli-driver team mailing list archive

[Bug 1224795] [NEW] observe() doesn't wait for any event to occur and the next line runs immediately

 

Public bug reported:

-----------------------------------------------------
Environment:
Windows7
Sikuli 1.0.1 IDE

-----------------------------------------------------
when I run the script below, observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.

-----------------------------------------------------
script:

def handler(event):
    print(event.type)
    stopObserver()

def test():
    onAppear("recycle.png",handler)
    observe()
    print("end")

-----------------------------------------------------
test result:
print "end"

** Affects: sikuli
     Importance: Undecided
         Status: New

** Description changed:

  -----------------------------------------------------
- Environment: WIndows7  Sikuli 1.0.1 IDE
+ Environment: 
+ Windows7  
+ Sikuli 1.0.1 IDE
  
  -----------------------------------------------------
  when I run the script below, observe() does not wait for the appear event to occur,but "print()" runs immediately.
  
  -----------------------------------------------------
  script:
  
  def handler(event):
-     print(event.type)
-     stopObserver()
-     
- def test():  
-     onAppear("recycle.png",handler)
-     observe()
-     print("end")
+     print(event.type)
+     stopObserver()
  
- -----------------------------------------------------    
+ def test():
+     onAppear("recycle.png",handler)
+     observe()
+     print("end")
+ 
+ -----------------------------------------------------
  test result:
  print "end"

** Description changed:

  -----------------------------------------------------
- Environment: 
- Windows7  
+ Environment:
+ Windows7
  Sikuli 1.0.1 IDE
  
  -----------------------------------------------------
- when I run the script below, observe() does not wait for the appear event to occur,but "print()" runs immediately.
+ when I run the script below observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.
  
  -----------------------------------------------------
  script:
  
  def handler(event):
      print(event.type)
      stopObserver()
  
  def test():
      onAppear("recycle.png",handler)
      observe()
      print("end")
  
  -----------------------------------------------------
  test result:
  print "end"

** Description changed:

  -----------------------------------------------------
  Environment:
  Windows7
  Sikuli 1.0.1 IDE
  
  -----------------------------------------------------
- when I run the script below observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.
+ when I run the script below, observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.
  
  -----------------------------------------------------
  script:
  
  def handler(event):
      print(event.type)
      stopObserver()
  
  def test():
      onAppear("recycle.png",handler)
      observe()
      print("end")
  
  -----------------------------------------------------
  test result:
  print "end"

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

Title:
  observe() doesn't wait for any event to occur and the next line runs
  immediately

Status in Sikuli:
  New

Bug description:
  -----------------------------------------------------
  Environment:
  Windows7
  Sikuli 1.0.1 IDE

  -----------------------------------------------------
  when I run the script below, observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.

  -----------------------------------------------------
  script:

  def handler(event):
      print(event.type)
      stopObserver()

  def test():
      onAppear("recycle.png",handler)
      observe()
      print("end")

  -----------------------------------------------------
  test result:
  print "end"

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


Follow ups

References