Select random cursors on map using selenium



  • I'm using google map api in my site and I want to test the cursors on map using Selenium. Now I use this code and it works fine: clickAt > xpath=(//map[@id='gmimap85']) but it tests only one cursor (cursor number 85), and map page is a dynamic page so I want a way to make selenium select any random cursor on map page. Any help would be appreciated.



  • I'm not sure if you have a set range but what you can use is: store|javascript{"http://gmimap" + Math.floor(Math.random()*11);}|randomcoord clickAt|xpath=(//map[@id='${randomcoord}'])|



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2