docs: re-add jsdoc

This commit is contained in:
amhsirak
2024-12-11 02:08:08 +05:30
parent fea0c0331b
commit b72baca821

View File

@@ -6,13 +6,12 @@ import logger from "../logger";
type Workflow = WorkflowFile["workflow"]; type Workflow = WorkflowFile["workflow"];
/** /**
* Returns a {@link Rectangle} object representing * Checks the basic info about an element and returns a {@link BaseActionInfo} object.
* the coordinates, width, height and corner points of the element. * If the element is not found, returns undefined.
* If an element is not found, returns null.
* @param page The page instance. * @param page The page instance.
* @param coordinates Coordinates of an element. * @param coordinates Coordinates of an element.
* @category WorkflowManagement-Selectors * @category WorkflowManagement-Selectors
* @returns {Promise<Rectangle|undefined|null>} * @returns {Promise<BaseActionInfo|undefined>}
*/ */
export const getElementInformation = async ( export const getElementInformation = async (
page: Page, page: Page,
@@ -159,6 +158,15 @@ export const getElementInformation = async (
} }
}; };
/**
* Returns a {@link Rectangle} object representing
* the coordinates, width, height and corner points of the element.
* If an element is not found, returns null.
* @param page The page instance.
* @param coordinates Coordinates of an element.
* @category WorkflowManagement-Selectors
* @returns {Promise<Rectangle|undefined|null>}
*/
export const getRect = async (page: Page, coordinates: Coordinates, listSelector: string) => { export const getRect = async (page: Page, coordinates: Coordinates, listSelector: string) => {
try { try {
if (listSelector !== '') { if (listSelector !== '') {