Skip to content

ybouhjira/casper-geolocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

Test your geolocation apps using Casper.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published