views:

28

answers:

2

I am trying to use Webdriver to test a location aware website and would like to programatically (using WebDriver API call) click on the "Share Location" button that pops up when I click on a link to the location aware part of the web application.

It is a browser prompt and does not seem to be a DOM element or javascript popup element.

A: 

You can try locating by xpath //input[@value="Share Location"] is it is an <input type=button>, or probably you can try //button[contains(., "Share Location")] if it is a <button> element

ZloiAdun
A: 

If it does do now show up in the DOM (e. g. if it is a Flash button), you can use iMacros and its Direct Screen / Image recognition commands.

SamMeiers