Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to record an action using PhantomJs/CasperJS or similar headless browser?

Ok, here is a brief description of problem I'm trying to find a solution for.

Let's say we have an online service that can automate different online tasks (clicking on a link, navigate to the page, choose an option from a combo box and finally copy the address from address bar). The site that I want to perform these actions on is completely in JavaScript and I want everything to be at the PHP endpoint I mean a php script get parameters from users, pass it to JS Server and retrieve the result and show it back to the user.

How could such a scenario be done? Any idea? I know that it can be done by analyzing DOM elements in details but its very very time consuming and volatile. Just want to know is there any way so I can record that action like what we can do with Selenium? What about that php <-> Headless browser interaction?

like image 706
abtvah Avatar asked Feb 16 '23 16:02

abtvah


1 Answers

For the manual recording part of the question, The CasperJS + resurectio Chrome extension combo is really convenient.

like image 166
NiKo Avatar answered Feb 18 '23 12:02

NiKo