diff --git a/README.md b/README.md index b74de9d..cca0a9c 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ Certainly! Here's a rephrased version of the provided content, presented in a ma - `locator.innerText` - `locator.inputValue` - `locator.isChecked` +- `locator.isEnabled` - `locator.isVisible` - `locator.uncheck` - `page.goto` diff --git a/src/completeTask.ts b/src/completeTask.ts index 134fd15..163b360 100644 --- a/src/completeTask.ts +++ b/src/completeTask.ts @@ -272,6 +272,28 @@ export const completeTask = async ( }, }, }, + { + function: async (args: { elementId: string }) => { + return { isEnabled: await getLocator(args.elementId).isEnabled() }; + }, + name: "locator_isEnabled", + description: "Returns whether the element is enabled. Element is considered enabled unless it is a