Javascript
The Javascript Client comes bundled with Puth. If you have installed Puth, then you already have the Javascript Client.
#
UsageIn this example, we will use nodejs to run the example code.
So lets require the Puth Client, make our first context and open this website.
#
What is a ContextA Context is your main Object on the Server. You always interact with the Context. There are only two functions
to get started: createBrowser
and connectBrowser
. With createBrowser
you will create a Browser on you Puth Server.
With connectServer
you let your Context connect to an external Browser instance. connectBrowser
internally calls
puppeteer.connect()
while createBrowser
internally calls puppeteer.launch()
.
When you have created/connected to a Browser, you have all of puppeteer's functions and of all of your Plugins functionality available.
For example, if you have started your own Browser in Daemon mode, you can connect with the Devtools Websocket URI.