Introducing the Edge Inspect JavaScript API

Introducing the Edge Inspect JavaScript API

We’ve had a number of you tell us that you would really like to be able to drive your Edge Inspect devices as part of your continuous integration build process, or from a browser other than Chrome. We’re excited today to tell you that this is now possible, using the new Edge Inspect JavaScript API.

The Edge Inspect JavaScript API represents a subset of the features you see in the Edge Inspect Chrome Extension. Specifically, the API allows you to send URLs to devices and take screenshots. Using the Edge Inspect JavaScript API you can also access a couple of screenshot-related features that aren’t yet available in our Edge Inspect Chrome Extension: Dual Orientation Screenshots, and Full Page Screenshots.

When using Dual Orientation Screenshots, your devices will take a screenshot in whatever orientation they are currently in, auto-rotate 90 degrees, take another screenshot, and then auto-rotate back. This allows you to easily gather both portrait and landscape mode screenshots without having to touch your devices.

When using Full Page Screenshots, your devices will take a screenshot of your entire page (available memory permitting), rather than what’s currently showing in the viewport. If your device doesn’t have enough memory for us to take a full page screenshot, we’ll try to get as much of the page as we can. The meta-data files that come back with your screenshots will tell you how much we got, and if we hit a memory limitation on the device.

Edge Inspect JavaScript API now available

The Edge Inspect JavaScript API is provided under the Apache 2 open source license, and is available beginning today on GitHub. Included are some instructions on how to use the library, and a couple of examples for how you might use it – a simple HTML Test Page, and a Grunt task that uses the library in a node context.

We think there might be cool uses for Edge Inspect that haven’t been discovered, and we hope that this JavaScript library will open the door to explore them. If there is something you would like to see included in the API, let us know.

Tell us how you use the Edge Inspect JavaScript API

If you make something using the API, please tell us about it! You can leave a comment on this blog post, post it in the Community Forums, or tell us on twitter: @edgeinspect@brucebowman or @duaneobrien.

Duane O’Brien
Sr. Computer Scientist, Edge Tools & Services
Twitter: @duaneobrien

This entry was posted in Announcements, Workflow enhancements and tagged , , , , , . Bookmark the permalink.

3 Responses to "Introducing the Edge Inspect JavaScript API"