Skip to content

Loop in COMMAND ocrGetText(<object>) #657

Open
@P-Courteille

Description

@P-Courteille

Environment (please complete the following information):

  • Node.js version: 22.11.0
  • NPM version: 10.9.1
  • Platform name and version: Android 11 (testing on native android app)
  • WebdriverIO version: 9.4.1
  • @wdio/visual-service version: 6.2.2
  • @wdio/mocha-framework version: 9.2.8
  • @wdio/local-runner version: 9.4.1
  • @wdio/globals version: 9.4.1
  • @wdio/cli version: 9.4.1
  • Appium version: 2.11.5
  • tsx version: 4.19.2

Config of WebdriverIO + @wdio/visual-service

services: [
        // your other services
        [
            "ocr",
            {
                contrast: 0.25,
                imagesFolder: "./onboard/output"
            },
        ],
        [
            "visual",
            {
                baselineFolder: path.join(process.cwd(), "onboard", "baseline"),
                formatImageName: "{tag}-{width}x{height}-{dpr}",
                screenshotPath: path.join(process.cwd(), "onboard", "output", "visual"),
                savePerInstance: true,
                clearRuntimeFolder: true,
            },
        ],
    ],

Describe the bug
After my typescript migration, it no longer work, it enter in a COMMAND ocrGetText() loop.
image

 await browser.ocrGetText({ haystack: await browser.$('myxpath') })

Expected behavior
The text is detected or if not, the following message is return "Error: An error happened when parsing the getNodeOcrData, see: Error: No text was found for the OCR, please verify the stored image."

Additional context
I'm using typescript and my tsconfig contain:

"types": [
            "node",
            "@wdio/globals/types", 
            "@wdio/mocha-framework",
            "@wdio/appium-service",
            "@wdio/ocr-service",
            "@wdio/visual-service",
            "i18next"
]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions