Skip to main content

Introduction

Intro video

MapGrab is a tool that enables the writing of automated map tests based on the MapLibre GL JS and Mapbox GL JS libraries. Please review the following specifications.


Supported testing frameworks

LibraryMin versionMax version
Playwright (recommended)1.20.0latest
Cypress13.0.0latest
Selenium/WebDriver4.0.3latest

Supported map libraries

LibraryMin versionMax version
Mapbox GL JS2.0.0latest
Maplibre GL JS4.3.0latest

Supported map layers type

Layer type
Symbol
Line
Fill
Circle

Supported features by testing frameworks

FeaturePlaywrightCypressSelenium
Trigger Click/dblclick/contextmenu on map elements
Get bounding box element from map on screen (similar to getClientBoundingRect() )
Out of the box element visual regression (screenshot comparison)
Wait to map loaded handler
Wait to map complete painted/stable handler
Set map view (by window x/y or map lat/lng)
Fit map to bounds (by window x/y or map lat/lng)
Expose layers (eg. hide specific layers before make screenshot)
Convert x/y screen point to lat/lng on map
Convert lng/lat to x/y position on screen
Working on iframe
Custom Assertions