I am trying to click on a link called 'Estimate Shipping Fee' from http://www.dresslink.com/women-woolen-winter-trench-double-button-fur-collar-coat-p-9442.html that will open up an iframe overlay that fetches content via ajax and populates it.
here's the code
from splinter import Browser
browser = Browser('phantomjs')
def extract(url):
browser.visit(url)
browser.find_by_css(".floatl.shipping_fee a").click()
browser.is_element_present_by_id('global_popup_login_iframe', wait_time=10)
with browser.get_iframe('global_popup_login_iframe') as iframe:
iframe.is_element_present_by_id('dyanmic_shipping_list', wait_time=10)
shippingprice = iframe.find_by_tag('img')
print shippingprice[1]['src']
extract('http://www.dresslink.com/women-woolen-winter-trench-double-button-fur-collar-coat-p-9442.html'
the problem is that it seems to not able to find an element inside the iframe, I've tried find_by_css, by_xpath, the result is same.
splinter.exceptions.ElementDoesNotExist: no elements could be found with tag_name "img"
there's an img tag in there for sure, yet it cannot find it.