ocrGetText
이미지에서 텍스트를 가져옵니다.
Usage
const result = await browser.ocrGetText();
console.log("result = ", JSON.stringify(result, null, 2));
Output
Result
result = "VS docs API Blog Contribute Community Sponsor v8 *Engishy CV} Q OQ G asearch Next-gen browser and mobile automation Welcome! How can | help? i test framework for Node.js Get Started Why WebdriverI0? View on GitHub Watch on YouTube"
Logs
[0-0] 2024-05-25T17:38:25.970Z INFO webdriver: COMMAND ocrGetText()
......................
[0-0] 2024-05-25T17:38:26.738Z INFO webdriver: RESULT VS docs API Blog Contribute Community Sponsor v8 *Engishy CV} Q OQ G asearch Next-gen browser and mobile automation Welcome! How can | help? i test framework for Node.js Get Started Why WebdriverI0? View on GitHub Watch on YouTube
Options
contrast
- Type:
number - Mandatory: no
- Default:
0.25
대비가 높을수록 이미지가 어두워지고 그 반대도 마찬가지입니다. 이는 이미지에서 텍스트를 찾는 데 도움이 될 수 있습니다. -1과 1 사이의 값을 허용합니다.