UNPKG

@uuv/assistant

Version:

UUV Helper used to improve the life of testers and developers by generating cucumber phrases from the GUI.

30 lines (29 loc) 1.67 kB
/** * Software Name : UUV * * SPDX-License-Identifier: MIT * * This software is distributed under the MIT License, * see the "LICENSE" file for more details * * Authors: NJAKO MOLOM Louis Fredice & SERVICAL Stanley * Software description: Make test writing fast, understandable by any human * understanding English or French. */ import { TranslateSentences } from "./model"; import { EnDictionary } from "@uuv/dictionary"; export declare abstract class Translator { protected dictionary: EnDictionary; protected selectedHtmlElem: HTMLElement | SVGElement; translate(htmlElem: HTMLElement | SVGElement): Promise<TranslateSentences>; abstract getSentenceFromDomSelector(domSelector: string, htmlElem?: HTMLElement | SVGElement): TranslateSentences; abstract getSentenceFromAccessibleRoleAndName(accessibleRole: string, accessibleName: string): TranslateSentences; abstract getSentenceFromAccessibleRoleAndNameAndContent(accessibleRole: string, accessibleName: string, content: string): TranslateSentences; static getSelector(element: any): string; protected initResponse(): TranslateSentences; protected computeSentenceFromKeyRoleAndName(computedKey: string, accessibleRole: string, accessibleName: string): string; protected computeSentenceFromKeyRoleNameAndContent(computedKey: string, accessibleRole: string, accessibleName: string, content: string): string; protected computeSentenceFromKeyAndSelector(computedKey: string, selector: string): string; computeSentenceFromKeyAndContent(computedKey: string, content: string): string; getSentenceFromKey(key: string): import("@uuv/dictionary").BaseSentence; }