Open
Description
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.1Appium
version: 2.11.5tsx
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.
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"
]