# import asyncio
# from helpers.tool import Tool, Response
# from tools import browser
# from tools.browser import Browser


# class BrowserOpen(Browser):

#     async def execute(self, url="", **kwargs):
#         self.update_progress("Initializing...")
#         await self.prepare_state()

#         try:
#             if url:
#                 self.update_progress("Opening page...")
#                 await self.state.browser.open(url)
            
#             self.update_progress("Retrieving...")
#             await self.state.browser.wait_for_action()
#             response = await self.state.browser.get_clean_dom()
#             self.update_progress("Taking screenshot...")
#             screenshot = await self.save_screenshot()
#             self.log.update(screenshot=screenshot)
#         except Exception as e:
#             response = str(e)
#             self.log.update(error=response)

#         self.cleanup_history()
#         self.update_progress("Done")
#         return Response(message=response, break_loop=False)
