2

I want to run and control a browser window from a web application, to automate some things (like account creation etc.) on another site.

So my question is, is there a way to do it using selenium directly from the browser, and in such a case how to do it?
I know there is selenium-webdriver for JS, but in common use cases we use it with Node.js.

The WebDriver introduction suggests that this is possible:

It is primarily intended to allow web authors to write tests that automate a user agent from a separate controlling process, but may also be used in such a way as to allow in-browser scripts to control a — possibly separate — browser.

1
  • you could either run it on your server and present results, or use some kind of browser plug-in... embedded Java (deprecated, and no longer supported), ActiveX (still around?)... maybe an extension or add-on could do it? Any javascript running in the browser on the client side would be inside the sandbox and not allowed to install/run a webdriver. Commented Mar 17, 2021 at 17:00

1 Answer 1

2

If what you want to do is: write a WebApp in such way that when it is loaded on client browser it does some actions on another website - the answer is "NO" - in order to use Selenium you need a thing called "WebDriver" this is a "program" that needs to be run on the machine where selenium is to be run (and it controls the client browser) - but running external programs from browser is not allowed.

What you can do with selenium - run the "webdriver" on a specific machine, and control/automate actions in a browser on this machine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.