Repository navigation
Base image: self-contained Oculix natives + working opt-in OCR text actions - #169
Merged
Merged
Conversation
…ve third_party/xysikulixapi dependency; add seam source
…ectations
seam/src/findTargetImage.js:
- Restore the truncated main block (target_result + console.log) so the CLI
always emits its JSON on stdout.
- OCR mode no longer uses Screen.capture() (which returns no getWidth() in this
Oculix build and threw an uncaught TypeError, killing the process with no
output). It OCRs the screen in place via new Region(screen.getBoundsSync()),
using Region.findText() for a tight box when available and the searched
region's rectangle otherwise.
- Stop shell-quoting argv values: shell-quote escaped the space in
"AUTOTEST OCR" to AUTOTEST\ OCR, so OCR text never matched. Drop
safequote.js, which is now dead code.
- Set 'clicked' only for actions that actually click; 'hover' leaves it null.
.docker/autobdd-base.dockerfile:
- The bundled Linux x86-64 natives live inside the engine JAR under
linux-x86-64/; the old 'java -jar ... -c' warm-up extracted nothing, so the
copy glob matched zero files and the image shipped no natives. Extract them
deterministically with unzip, install them world-readable into
/opt/oculix-natives, register the directory via /etc/ld.so.conf.d + ldconfig
and keep LD_LIBRARY_PATH. The image is now self-contained: no runtime
extraction and no writable /tmp or /root required.
test-projects/autobdd-base-test/base-test/run.sh:
- Re-enable the native-library checks (they pass for real now) and correct five
OCR expectations that compared jq -r output ('object') against a quoted
literal ('"object"').
README.md:
- Natives are baked at image-build time, not extracted at runtime.
- --ocrDetail reports the matched region (tight box when available), not one
entry per word; 'clicked' is documented as clicking-actions-only.
Verified: docker build + 'AutoBDD_Ver=test docker compose run --rm
autobdd-base-test make base-test' -> base-test: 50 passed, 0 failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an opt-in OCR mode to the frozen
findTargetImageCLI seam and makes the base image self-contained with respect to the Oculix native libraries. Existing image-matching consumers are unaffected: with no--ocr*argument the seam follows the original code path and returns the original JSON shape.Changes
seam/— the seam is now in-tree (no npm dependency)third_party/xysikulixapi; the seam source, afetch-oculix.shthat pulls the latest stable Oculix JAR at build time, and a minimalpackage.json(java-bridge,minimist) live underseam/.--ocrPath,--ocrSimilarity,--ocrMaxSim,--ocrWaitTime,--ocrMaxCount,--ocrAction,--ocrDetail,--ocrPSM,--ocrOEM.click,doubleClick,rightClick,hover,hoverClick) and add an optionalocrDetailsarray.clickedis set only for actions that actually click..docker/autobdd-base.dockerfile— natives are bakedlinux-x86-64/. Extracted deterministically withunzipinto/opt/oculix-natives, registered via/etc/ld.so.conf.d/oculix.conf+ldconfig, withLD_LIBRARY_PATHset — so the image needs no runtime extraction and no writable/tmpor/root.Tests & docs
autobdd-base-testgains an OCR section (detection + all five actions); the native-library checks are now meaningful.ocrDetailsfield, and the self-contained natives.Verification
Known limitation
--ocrDetail=wordreports the matched region (tight box when the engine exposes one, otherwise the searched region's rectangle) rather than one entry per token. Per-word boxes needOCR.readWords()/ResultIterator, unconfirmed in this Oculix build; the current path never crashes and is documented as best-effort.