-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
import gymnasium as gym
import browsergym.core # register the openended task as a gym environment
import browsergym.workarena
from bgym import HighLevelActionSet
from time import sleep
env_ids = [id for id in gym.envs.registry.keys() if id.startswith("browsergym/workarena")]
print("\n".join(env_ids))
# start an openended environment
env = gym.make(
"browsergym/workarena.servicenow.filter-asset-list",
action_mapping=HighLevelActionSet("coord").to_python_code,
headless=False
)
# run the environment <> agent loop until termination
obs, info = env.reset()
env.step("mouse_click(62, 75)") # click on the filter button
sleep(3)
env.step("mouse_click(109, 171)") # click on the choose option
sleep(3)
env.step("mouse_click(123, 286)") # click on the option
sleep(3)
env.step("mouse_click(310, 167)") # click on the cond operator
import pdb; pdb.set_trace()
# release the environment
env.close()
I run this code to see the process of workarena.servicenow.filter-asset-list
, the last action is to click the cond operator in the filter.(region in the red rectangle)
But after this action, the dropdown menu appears and then disappears
For a agent which takes screenshot as input and outputs action with coordinates like click(300,200)
, it will stuck on this step of this task
Metadata
Metadata
Assignees
Labels
No labels