If I needed to perform certain actions on a website, such as clicking "New thread" "New Post" and performing an action, and then looping it a few times - What's the best type of code for this?
|
Help
What type of coding is it to perform actions on a site? |
(Apr 29, 2020 10:45 AM)Social Engineer Wrote: If I needed to perform certain actions on a website, such as clicking "New thread" "New Post" and performing an action, and then looping it a few times - What's the best type of code for this? I would definitely vote JavaScript. Have a look at userscripts for a start ;)
Apr 29, 2020 02:02 PM
(This post was last modified: Apr 29, 2020 02:13 PM by MavenGradle.)
JavaScript (and many other languages for that matter, some are only a browser-plugin away, even though that solution is rather ugly) can be executed inside browsers. Here's an example of a project that displays an alert when a button is clicked, using JavaScript:
https://jsfiddle.net/fqnmbkxw/ Code // Retrieve the DOM elementAdditionally, there are various other languages that you can utilize to make an interactive website, including but not limited to:
The most popular "alternative" at the moment would be TypeScript, but do keep in mind that most of these languages (including TypeScript) are translated/"compiled" into JavaScript in the end and delivered to the client as such. Anyway, to answer your question, this type of programming is called webdevelopment. ![]()
As mentioned, JavaScript is your friend here. Although judging from your question JavaScript is your friend period.
For you particular application depending on how much of, let's call it, "real browser usage simulation" you want to achieve you can start off with either of these: - Selenium - Puppeteer If you want something less bulky with a simple goal of automating some tasks then CJS/"Custom Javascript for websites" (can't tell if it's actually branded as CJS) is your friend. Basically an extension for Chrome that lets you store and run JavaScript scripts. |
|
|



![[Image: vp6iypF.gif]](https://i.imgur.com/vp6iypF.gif)
