> marcwestwood0...@gmail.com Mar 12 04:11AM -0700 > > Hi has anyone had any experience with automating google maps using watir? > I have a website which I am automating that has a embedded google map in > it, I need to select a location on the map before I can continue. > > Does anyone know how this is possible using watir?
There are a number of issues here. Mainly it depends on what you mean by automation, in the context of Google Maps. Maps works via a JavaScript API, BUT... after the initial creation of the map (which requires a private API key), interaction with the map is generally limited to basic UI functions like clicking and dragging, although you may be able to get some kind of interaction via "search nearby" or some such. This is an interesting idea. If you could inject some JavaScript into the page (the old Watir allowed you to do that easily; I am not so sure about recent versions), then it is possible you could make some API calls using the already existing key, but maybe not. If not, you are likely limited to simulating click-and-drag with coordinates, and maybe a bit of text interaction with the routes and search nearby functions. Without knowing more about what you're trying to do, my best suggestion would be to get your own API key for development, generate some test maps, and see what you can do with them. But this reminded me of an issue I have been meaning to bring up: While Selenium-Webdriver is nice in many respects, since Watir has been using it there have been some sorely missed features. This forum has already discussed such things as checking browser status (impossible to do via Selenium-Webdriver). But the single feature I miss most is the ability to actually change HTML and JavaScript using "=". For example, it used to be possible to do something like browser.h1(:text => /Subject Header/).html = '<a href="my_new_url">Click here</a>' There are lots of uses for this. But anymore, whenever I tried something like that I would get a message like 'undefined method "=" for Watir::blahblah' Does anyone know of a way to implement this functionality using the current version of Watir? (Please don't waste my time asking why I want to do that. I do have legitimate reasons for wanting to, but it takes too long to explain, and it is not really relevant to the question.) Lonny Eachus -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.