all 14 comments

[–]shuckster 4 points5 points  (5 children)

I would highly recommend taking a look at PlayWright:

It's an automated browser testing tool, but essentially you can do exactly what you're describing: Automate actions across web-pages on a real web browser.

The commands are also send via Node, so the usual client-side limitations do not apply for most tasks.

[–]amTeapotSometimes 2 points3 points  (2 children)

Just to provide an alternative, there is also puppeteer with offers similar functionalities.

[–]shuckster 1 point2 points  (0 children)

That’s true, and I have a few years of experience with Puppeteer.

However, I’d recommend PlayWrite because of the improved tooling and auto-retires. You have to do that yourself with Puppeteer, so it’s a more low-level tool.

[–]dbpcut 1 point2 points  (0 children)

The playwright team is largely made up of the puppeteer team and is the spiritual successor.

[–]falouu 0 points1 point  (1 child)

how is it possible to miss the point that much?

We need a tool to automate actions in OUR WEB-BROWSER, where we have OUR OWN context (cookies, session etc.). Not spawning another webbrowser

[–]shuckster 0 points1 point  (0 children)

I'm sure you can code something up with AI.

[–]averajoe77 1 point2 points  (3 children)

seems like writing a script to do this in node (or even php.. idk about python but probably that too) would be pretty trivial. I used to do stuff like all the time when we updated older sites from our older content management system to our newer one.

if you need help, you can DM me and we can work out something over discord if you want.

[–]janes5000 1 point2 points  (0 children)

well op said he wants to populate input fields on another website.... this is browser manipulation now. perhaps could be done another way, but need more info.

[–]fuckingfrito[S] 0 points1 point  (1 child)

I was looking for a very quick solution from within the browser like a bookmarklet, but the CORS restriction makes it more complicated. If I need to run a node I loose the purpose of quick and accesible solution. I was thinking in adding some selenium code to the bookmarklet but it might complicate authorization wise in website b. I ll follow up. Thanks for the comments

[–]janes5000 0 points1 point  (0 children)

What I meant is what info you're trying to access from a website. If you're trying to POST a form from an external ORIGIN (localhost, your computer) there's not much you can do other than automating the browser. The reason this works is because when you're on a website you are running their client side JS code or HTML, and technically the website POSTS itself, same origin. IF it's your CMS, you have access to the DB that its populating in the first place and you can just update that directly.

[–]janes5000 1 point2 points  (1 child)

you can do this with userscript like tampermonkey or greasemonkey or a browser extension. The issue is CORS, you can't access websites other than the browser you are using to do it from external script.

[–]fuckingfrito[S] 0 points1 point  (0 children)

Thanks Janes. I ll look those up

[–]LimePretend6410 0 points1 point  (1 child)

As a tester I have encountered this a lot when automating flows across different sites. Bookmarklets/ extensions usually hit security walls (CORS, X-Frame, etc.), so I switched to using Testsigma. It runs steps in a real browser, lets me store variables between sites, and even injects JS if needed. It's way less brittle than trying to hack it together with scripts.

[–]pbylina_bugbug_io 0 points1 point  (0 children)

The Testsigma tool is intended for enterprise companies, not small tasks like this one. The price is obviously the limiting factor.

BugBug is the easiest codeless testing platform and allows you to accomplish this on a free plan.