I guess you give it an initial query and then you tell ChatGPT to predict the URL to go to and then at each step you feed it the generated HTML source and you tell it to predict what element to click on.