StartWebSession creates a websession which can be controlled with many commands to automate web stuff. It is limited -- what if one wants to include arguments to the web browser, or start web browsers other than Chrome or Firefox? Presumably, one could use StartProcess to initiate an arbitrary web browser with command line arguments, then create a WebSession from the resulting ProcessObject. Is there a way to obtain a WebSessionObject from a ProcessObject? If not, can one emulate the functionality provided by WebExecute and similar commands with ProcessConnection to automate web browsing even the the fullest extent?
$\begingroup$
$\endgroup$
2
wgetorcurlcommands, or your whatever API you have to your browser, so you can issue commands via Mathematica functions. As you say, you could achieve this with a process, or you could drive it from a python script. But if you want to automate browsing you can do this much more simply from C#. There's also github.com/ariya/phantomjs which is decent, though if you need maintenance it's unfortunately no longer in active development. $\endgroup$options = FirefoxOptions() options.add_argument("--headless") options.add_argument("-private")$\endgroup$