0.0.9 • Published 1 year ago

stb-devtools v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

STB Devtools

Tools written in plain Javascript to setup some tools to help work on devices without Webdriver support.

Due to usage of WeakSet for circular JSON detection the browser support is defined fully here: https://caniuse.com/?search=Weakset

Native Browser Support:

  • Chrome 36
  • Firefox 34
  • Safari 9

Setup

Put a <script> tag into your application's HTML that loads client/index.js. This will put the following APIs into the global scope.

Socket Connection (required)

  • createSocket('ws://localhost:3031') Creates a websocket connection to the remote server provided, other features work over this network connection.
  • closeSocket() Closes the websocket connection on the client.

Remote Logger

API:

  • injectConsole() Replaces the console API with sending logs to the socket server.
  • restoreConsole() Restores the console API back to it's original methods.

Remote Control

API:

  • remoteControlOn() Starts broadcasting keyboard events from this browser to all other connected clients, who will dispatch the events as synthetic keyboard events locally automatically.

Temporary File

Client usage

From the client send a command like the below

stbSocket.send(JSON.stringify({command: 'temp-file', data: data }));

Socket Payload:

{
  command: 'temp-file',
  data: 'stringetc'
}

Will be saved to a temporary file using the module tempy.

0.0.9

1 year ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago