← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #665279]: [HowTo] node-java : Using SikuliX features through API --- tipps and tricks

 

Question #665279 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665279

    Status: Solved => Open

Finn Ellis is still having a problem:
I've got another question for you -- I'm keeping it here for now since
it's part of the same weird setup, but happy to start another thread if
that would make more sense.

I have a script now (still using the Java API + node-java bridge) which
runs fine locally but is hanging in CI, seemingly somewhere inside
Mouse.click. I'm not sure what exactly the relevant environment
difference is, but here's what I'm seeing.

The relevant bit of node code is as follows (where this.waitForImage is
just a wrapper around screen.Wait which knows some things about where
images are).

      console.log(`Attempting to paste '${text}' into the '${imageName}' field`);
      const field = await this.waitForImage(imageName);
      console.log(`Clicking into ${imageName} ...`);
      this.screen.clickSync(field);
      console.log(`Pasting into ${imageName} ...`);
      this.screen.pasteSync(field, text);

The output, with debug level 3, is:

Attempting to paste '[redacted]' into the 'slack-placeholder-workspace' field
Waiting for image: slack-placeholder-workspace
[debug] Image: loaded: /Users/travis/build/tinyspeck/slack-desktop/spec/e2e/images/slack-placeholder-workspace.png (file:/Users/travis/build/tinyspeck/slack-desktop/spec/e2e/images/slack-placeholder-workspace.png)
[debug] Image: cached: /Users/travis/build/tinyspeck/slack-desktop/spec/e2e/images/slack-placeholder-workspace.png (25 KB) (# 1 KB 25 -- 0 % of 64 MB)
[debug] Region: wait: waiting 60.0 secs for /Users/travis/build/tinyspeck/slack-desktop/spec/e2e/images/slack-placeholder-workspace.png to appear in S(0)[0,0 1024x768]
[debug] Region: wait: /Users/travis/build/tinyspeck/slack-desktop/spec/e2e/images/slack-placeholder-workspace.png appeared (M[415,279 175x38]@S(S(0)[0,0 1024x768]) S:0.94 C:502,298 [2641 msec])
Found image: slack-placeholder-workspace
Clicking into slack-placeholder-workspace ...
[debug] Region: init: (0, 0, 5, 5)

So it's finding the image and trying to click on it, but gets stuck
trying and never gets as far as the paste call. I poked through the code
and didn't find anything obvious, other than the fact that it's stopping
somewhere before another debug statement.

I noticed in the changelog that the nightly build from a couple of days
ago had some version detection improvements, so I tried that, but no
luck.

Any other ideas, or any other information I can get for you?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.