I'm trying to select the radio button 'Government & Military' on this page using Selenium.
The code below tries two different methods, but neither are working:
from selenium import webdriver
browser = webdriver.Chrome('/Users/Joe/Python/chromedriver')
browser.find_element_by_xpath('//*[@id="propertygov"]').click()
browser.find_elements_by_xpath('.//*[@id="propertygov"]')[0].click()
Edit:
Here is the full code. The initial interaction with the date form is keeping me from selecting the radio select:
from selenium import webdriver
browser = webdriver.Chrome('/Users/Joe/Python/chromedriver')
browser.get("http://www.marriott.com/search/default.mi")
browser.find_element_by_id('editsearch-location').send_keys('Atlanta, GA')
browser.find_element_by_xpath('//*[@id="hotel-fromDate"]').click()
browser.find_element_by_xpath('//*[@id="hotel-fromDate_table"]/tbody/tr[2]/td[2]/div').click()
browser.find_element_by_xpath('//*[@id="hotel-fromDate_table"]/tbody/tr[2]/td[3]/div').click()
browser.find_element_by_id('propertygov').click()