← Back to team overview

sikuli-driver team mailing list archive

[Bug 1243907] Re: After sometime application stops finding text

 

Ok, what about a screenshot?
How long did the script run?

You can add attachments here.

Just to get an impression, what might be wrong in that moment, you might
insert the following code snippet


            find("MyProjectLis-1.png")
            hover("MyProjectLis-1.png")
            click("IIarIlSelect.png")
            t = "SIKUL"
#            m = find(t)
            if not exists(t):
                import os
                import shutil
                dir = r"C:\Users\Sobral\Desktop"
                img = capture(SCREEN)
                shutil.move(img, os.path.join(dir, "errorshot.png")
                exit(1)
            m = getLastMatch()  
            hover(t)
            click(t)

Another question:
Might it simply be, that in the crash moment after
            click("IIarIlSelect.png")
it simply lasts more than 3 seconds for the text to appear?
Have you ever tried, to simply wait a bit longer:
            m = wait(t, 10)

This is no harm, if it is found, it comes back immediately, but if it is
not there after 3 seconds (as with find()), it just tries for a longer
time.

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

Title:
  After sometime application stops finding text

Status in Sikuli:
  New

Bug description:
  Description

  Script works properly, but after sometime runnig it stops find text

  
  ''' Steps to reproduce'''

   - Have a the line in some part of script

              t = "SIKULI"
              m = find(t)
              hover(t)
              click(t)

   - run the script some times
   - After some time of user, sikuli doesn't find the word SIKULI anymore

  
  full script:

  
  def overtimeActivity():

      deDashboard = ("DDEDashboard.png")
      selectItemImage = ("1371671431871.png")
      
      
      try:

              find (deDashboard)
              click (deDashboard)

              while exists("Sairdestapag.png"):
                  find("Sairdestapag.png")
                  click("Sairdestapag.png")
                  wait(5)
          

          
              
              find("MyProjectLis-1.png")
              hover("MyProjectLis-1.png")
              click("IIarIlSelect.png")
              t = "SIKUL"
              m = find(t)
              hover(t)
              click(t)
          
              print("work item")
              find("WorkItemMyWo.png")
              print("achou o work")
          
              click ("WorkItemMyWo.png")
              print("passei")
          
              l = "Testing"
              z = find(l)
              hover(l)
              click(l)

              if exists("MyProjectLis.png"):
              
                  find("0000.png")
                  click("0000.png")
              
                  #input ler sobre esse comando#
                  type("0600")

                  if exists("IOvertime-1.png"):
                  
                       find ("Elc.png")                   
                       click("Elc.png")
                       wait("QOvertime.png")
                       wait(2)
                       find("AddActivity.png")
                       click("AddActivity.png")
                  else:
                      print("TEST FAILED - Hours not Reported - Problem '''click check box'''")
                      raise exception            
              
              else:
               print("TEST FAILED - Hours not Reported")
               log = "erro"
               logaDados(log)
               raise exception      

              if exists("DONE.png"):
             
                 print(" Test Passed")

              else:

                  print("TEST FAILED - Hours not Reported")
                  f=Screen(S)
                  print(S)
                  raise Exception
           
          
           
      except:
          print("TEST FAILED - Hours not Reported")
          raise exception

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


References