[OpenLayers-Dev] Functional Testing with Selenium

Tim-Hinnerk Heuer th.heuer at gmail.com
Thu Oct 2 03:01:51 PDT 2014


Is there a way to test web applications with Selenium and OpenLayers 2 (and
maybe 3)?

I'm asking because I have setup Selenium Webdriver with Cucumber and would
like to test the mapping part of the application(s). Everything works
nicely. I can fill out forms, click on elements etc.

However, zooming and panning a map OpenLayers object is different. I cannot
even figure out how to emit an event that would trigger a feature
information in our application. However, I found it difficult to find out
how to do just that. With Selenium and Webdriver one can execute JavaScript
within a web browser context. It is basically a remote control for a web
browser that actually starts up when the tests run. So, if you know some JS
that emits the right events that would be a great help already.

Thanks in advance,

Tim-Hinnerk Heuer

Twitter: @geekdenz
Blog: http://www.thheuer.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20141002/b495f745/attachment.html>

More information about the Dev mailing list