seems to work fine Issue: Code seems to be fine. But it is the order in which the calls are made are causing the issue.
list_of_currencies = get_all_currencies()
one.click() // opens the "Change-Currency" dropdown menu as shown in below image
isChangeCurrencyDisplayed = driver.find_element_by_id("currencyList").is_displayed()
if not isChangeCurrencyDisplayed:
print "dropdown is not displayed."
one = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "selected-currency")))
select_element = WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.ID, "currencyList")))
select = Select(select_element)
select.select_by_visible_text(text) # here text is "$ USD"
Does that help This is not a problem with Selenium or Nightwatch, but only with HTML IDs. / is not a valid character for ID. XPath uses / to select child nodes from a parent node: http://www.w3schools.com/XML/xml_xpath.asp
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.select import Select
from selenium.webdriver import ActionChains