Find failed after X steps

Asked by Tom Weghorn on 2019-09-26

Hello there, we have the problem that our script stops everytime when it reaches a specific amount of test steps.
Goal of this test is to open some windows of an application and check if the window opens with an error message or not.
We disabled steps before the part where it failed, and then the script went on to those parts where we had the find failed error before and it found the picture and tested the window. But then it goes on and fails again when it reaches the "limit". So we have an find failed error just when there are "too many" other test steps before.
Is there a setting that limits our test steps?
We are using VMware Fusion, MacOS Mojave 10.14.6, Sikuli.jar 1.1.4, Java Version 12.0.2, Script is *.py.

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

what is the concrete structure of your script?
what is a test-step?

Run the script with Debug.on(3) to get more information about what might happen before the crash.

RaiMan (raimund-hocke) said : #2

the only known restriction with Jython is, that a compiled script should not exceed 64KB (which means some 1000 lines of code)

Tom Weghorn (twnqa) said : #3

The structure of the test is that at script start it checks which application is installed (because we have an application which is custom branded for some companies) and then starts with opening some windows and depending on the customer it has more or less sites to click. To do that we wrote several functions for the different application windows and the script executes these functions step by step, this is what i ment with test step.
Each function opens a window, clicks a button then another window opens and if it contains an error message then it writes that into a logfile and closes the window. After that it continues with clicking on the next one and so on.

To run it with Debug.On(3) worked, but I can't read out important information of the outcome. If it helps I could provide my script or the log when the test fails.

As additional information, the test contains some *.png so the folder has in total about 340kb but the *.py file itself has just 40kb.

RaiMan (raimund-hocke) said : #4

ok, then it does not seem to be a script-size problem.

Another possibility could be: timing.

Might be, that after some steps being processed, there is some slow down (due to memory consumption), that leads to that the image-to-be-searched only has completely appeared after the wait time is exceeded.

So just try to increase the find wait time.

Come back if no success.

Tom Weghorn (twnqa) said : #5

Now I changed the wait timer with setAutoWaitTimeout(3) and now it doesn't stop with find failed error.

But now the script doesn't continue properly.
It should click on an icon and afterwards on an help button. The icons are stored in a single .png and we adjust the offset where the click should be done every test step so there are no issues with missmatching.

The problem is now that it continues to click on the first icons and works as expected but where it stopped before it now stops going on with different icons. It stays on the window and hits the help button until the amount of left over icons is done. We tried to comment out earlier icons to see if it has some issues with the offset but it worked properly then for the amount of steps we took out earlier.

If my description is too confusing please let me know and I will try to provide more details or send the code.

Launchpad Janitor (janitor) said : #6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Tom Weghorn (twnqa) said : #7

Any updates?

RaiMan (raimund-hocke) said : #8

ok, moved down in priority (due to release 2.0.0 works).

I have to admit, that I do not have any idea, how I can help (though I principally understand what you are doing).

If possible send me (sikulix---at---outlook---dot---com):
- the relevant part of the script
- the used images
- some screenshots and/or a short video

as zip with ref to this question.

Can you help with this problem?

Provide an answer of your own, or ask Tom Weghorn for more information if necessary.

To post a message you must log in.