Note
Lolley is only available in Windows
Installation and running
First, clone the repository and extract compressed.zip
after that run test.js
to run the program.
Using client.sendCommand()
client.sendCommand()
has 3 basic commands those are;
getHTML
Example usage: client.sendCommand("getHTML")
This method sends a getHTML
message to the browser. The browser responds with the current page’s HTML code. When browser tries to send HTML code to the NodeJS side
this will trigger the client.messageListener.on("message")
event. Example of this method can be found in test.js
file.
execJS
Example usage: client.sendCommand("execJS", 'alert("Hello World!")')
This method sends a execJS
message to the browser. The browser will execute the JavaScript code that you provide.
changeLocation
Example usage: client.sendCommand("changeLocation", 'https://google.com')
This method sends a changeLocation
message to the browser. The browser will navigate to the URL that you provide.