• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Standalone implementation of the Chrome DevTools backend to debug arbitrary web environments.

DevTools Backend

‼️ Attention: this project is not maintained anymore. Dependencies are out of date and introduce security vulnerabilities. Please not use it in production. ‼️

A Node.JS implementation of the Chrome DevTools backend for debugging arbitrary web platforms (e.g. HbbTV applications on Smart TVs). It is the counterpart of the devtools-frontend and is like weinre just in "new".

Requirements

Installation

To run the server you need to first clone the repo and install all its dependencies:

# clone repository
$ git clone [email protected]:christian.bromann/devtools-backend.git
$ cd devtools-backend
# install dependencies
$ npm install
# build project
$ npm run build

Then start the server by executing:

$ npm run start

You now have started the server on localhost:9222. You can see a list of inspectable pages on http://localhost:9222 (also available as json).

Instrument Your Web Application

The DevTools Backend allows you to instrument your app in two different ways. You can either inject a script manually into your app or use the proxy to automate the injection.

Manual Script Injection

To manually inject a script put the following script tag at the top of your page:

<script src="http://localhost:9222/scripts/launcher.js" data-origin="debugger"></script>

Once you open a page with a web client (like a browser) it should register your page and it should then be inspectable.

Proxy Script Injection

If your web client supports proxy settings you can also use the DevTools backend as HTTP proxy (note that this only works for pages served via http on port 80). Per default the server starts with the hostname of the machine it runs on. For example if you run the project on localhost and setup Firefox to proxy request to localhost:9222 it would allow to debug the Firefox browser with the DevTools application.

Firefox Demo

Logging

For debugging purposes you can set a logging path as environment variable and the DevTools Proxy will dump all log messages to multiple files within this directory. To set a logging directory just export LOGGING_PATH:

export LOGGING_PATH=/home/user/logs
# or start the server with that environment variable set
LOGGING_PATH=/home/user/logs npm run start

Development

To recompile files automatically run:

$ npm run dev

After files are recompiled you need to restart the server. This can be triggered automatically when running it in "dev" mode:

$ npm run start:dev

This project was created as part of a master thesis by Christian Bromann on "Design and implementation of a Development and Test Automation Platform for HbbTV". The dissertation originated in cooperation with the Fraunhofer Institute for Open Communication Systems (FOKUS) and Louay Bassbouss.

More Repositories

1

awesome-selenium

A curated list of delightful Selenium resources.
937
star
2

webdriverio-performance-testing

A small showcase on how to test performance using WebdriverIO
JavaScript
46
star
3

appium-hbbtv-driver

Automation for HBBTV apps
JavaScript
19
star
4

rgb2hex

a lightweight rgb/rgba to hex parser
JavaScript
14
star
5

samsungtv

Node.JS module to control newer models of Samsung Smart TVs (2016 and up)
JavaScript
14
star
6

cddl

Concise data definition language (RFC 8610) implementation and JSON validator in Node.js
TypeScript
14
star
7

flask-webdriver-demo

A minimal blog application in Flask enhanced with Sauce Labs and Travis CI test harness
Python
8
star
8

docusaurus-theme-github-codeblock

A Docusaurus v2 plugin that supports referencing code examples from public GitHub repositories.
TypeScript
6
star
9

appium-for-couch-potatoes

Selenium Conference Berlin 2017 - Appium for Couch Potatoes: An HbbTV Driver
JavaScript
3
star
10

saucecon-talk-2018-livecoding

Live Coding steps of the SauceCon 2018 talk
JavaScript
2
star
11

typescript-starter

A little boilerplate project I used as template when starting TypeScript projects
JavaScript
2
star
12

bromann.dev

Personal Homepage
JavaScript
2
star
13

seconf16_lightningtalk

Example files of my lightning talk at SeConf16
JavaScript
2
star
14

wdio-reportportal-example

Example project using WebdriverIO and Reportportal.io
JavaScript
1
star
15

cddl2ts

A Node.js package that can generate a TypeScript definition based on a CDDL file
TypeScript
1
star
16

webdriverio-applitools-testing

A small showcase on how to do visual regression testing using WebdriverIO and the Applitools service
JavaScript
1
star
17

master-thesis

Latex and research files for master thesis
TeX
1
star
18

teabo-logger

This is an example module for the TeaBo project
JavaScript
1
star
19

seconf-2023-demo

A demo project showcasing component testing in WebdriverIO for various frameworks
TypeScript
1
star
20

jest-environment-wdio

Jest environment to run WebdriverIO tests
JavaScript
1
star
21

christian-bromann

1
star
22

test-block

Hello GitHub Blocks
TypeScript
1
star
23

sauce-hbbtv-app

An HbbTV application for SauceLabs
JavaScript
1
star
24

spraycan

experimental webapp to spray graffiti in Google StreetView, using HTML5 and Google Maps API
JavaScript
1
star
25

autonomiq-example

A little demo of the WebdriverIO + AutonomIQ integration
JavaScript
1
star