casperjs-geolocation

0.0.0 • Public • Published

casper-geolocation

master

A Casper.js module for testing apps that use the geolocation API. It allows control of the client's geolocation via a simple setLocation() function.

how to use

var require = patchRequire(require)
  , initial_pos = { timestamp: Date.now(), coords: {latitude: 10, longitude: 10, accuracy: 10} }
  , casper = require('casper').create()
  , geo = require('casperjs-geolocation')(casper, initial_pos);

casper.start('http://site.com');

casper.then(function() {
  geo.setPos({latitude: 20, longitude: 20, accuracy: 10});
});

casper.run();

Package Sidebar

Install

npm i casperjs-geolocation

Weekly Downloads

2

Version

0.0.0

License

BSD-2-Clause

Last publish

Collaborators

  • ybouhjira