-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to add custom Actions that the agent can perform #394
Comments
Sure! Do you have any specific actions in mind, by the way? Selenium or Playwright are quite exhaustive. |
The agent failed while i was trying to execute a test case which required me to double click on an element. It gives me the following error: |
Currently, the available actions are limited to those implemented in the drivers. We haven't yet considered double-click actions. Could you share your use case with us? I wasn't aware that double-clicks were commonly used in web interfaces. We can certainly add double-click to the list of available actions. Would you like to contribute to this enhancement? It involves adding the necessary code to the exec_code function from the Selenium Driver, and documenting its usage within the prompt template. |
The use case is basically to open a folder in our internal application. I would be happy to contribute but currently i wont be able to takeout any free time from my schedule. I will be sure to take some time and contribute. |
Is a double click truly needed versus a simple click? |
Just to add details on how to modify the driver source code to add custom actions. You can do so with the following steps:
For example, you might add a new clearValue action: Name: clearValue
Description: Focus on and clear the text of an input element with a specific xpath
Arguments:
- xpath (string)
elif action_name == "clearValue":
self.clear_value(
item["action"]["args"]["xpath"]
)
def clear_value(self, xpath: str,):
elem = self.page.locator(f"xpath={xpath}").first
elem.clear()
|
Ability to perform custom actions with Drivers
Solution
There should be a way to add custom actions that we want to perform. Some websites may require us to do specific actions that may or may not be supported via selenium or playwright or some actions that are available in selenium but not executable by the Agent.
If there is a way already please let me know 🤗
The text was updated successfully, but these errors were encountered: