0

i really love to write some testcases with dalek for an app which needs to know the location of the user.

the app checks for geolocationsupport by checking the truethieness of navigator.geolocation. a fallback via userinput is given.

so dalek (most likely phantomjs) hangs at the point where permision for geolocation is asked since the browser seems to be geolocation-aware.

i don't need to use the browsers geolocation-functions if it is not (yet) possible, but i like to get a non-truethie value for navigator.geolocation if this is not possible.

do i have some options to get around this problem without touchiing the app itself?

thanks

1 Answers1

0

I never needed to test an application that requires the rights to access the geolocation, so making that testable is a future ToDo. The methods to test it are defined in the JSON Wire Spec (https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/location), but none of the Browsers/Drivers I know of, supports this as of today (maybe Chrome, haven't tested it recently).

So, I hope to get this in, in a future version.

But if I understand you correct, you do not need to test it, you only need to get rid of the dialog,I don't know what to do with PhantomJS, but I believe you can get rid of that if you pass an option to Chrome (see DalekJS: start browser with custom flags), but I don't know which option you need to set (Maybe you need to puzzle a bit).

Community
  • 1
  • 1