wdio-ocr-service
Version:
A WebdriverIO service that is using Tesseract OCR for Appium Native App tests.
43 lines (36 loc) • 1.01 kB
TypeScript
import { OcrGetElementPositionByText } from "../src/commands/ocrGetElementPositionByText";
import {
ClickOnTextOptions,
ElementPositionByText,
GetTextOptions,
OcrServiceConfig,
SetValueOptions,
WaitForTextDisplayedOptions,
} from "../src/typings/types";
declare global {
namespace WebdriverIO {
interface Browser {
ocrClickOnText(
selector: string,
options: ClickOnTextOptions = {}
): Promise<void>;
ocrGetElementPositionByText(
selector: string,
options: ElementPositionByText = {}
): Promise<OcrGetElementPositionByText>;
ocrGetText(
options?: GetTextOptions = {}
): Promise<string>;
ocrSetValue(
selector: string,
value: string,
options: SetValueOptions = {}
): Promise<void>;
ocrWaitForTextDisplayed(
selector: string,
options: WaitForTextDisplayedOptions = {}
): Promise<void>;
}
interface ServiceOption extends OcrServiceConfig {}
}
}