Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • Hi @Andersson, thanks for your very detailed resonse. However, when I try running this code driver.find_element_by_xpath('//a[contains(@href, "services.ics")]') I receive NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"a[href$=".ics"]"} (Session info: chrome=59.0.3071.115) Commented Jul 12, 2017 at 17:09
  • Received a TimeoutException: Message: by applying the ExplicitWait. Would this mean the link is not generated dynamically? Commented Jul 12, 2017 at 18:07
  • This might mean that link located inside an iframe. Can you check if there is an <iframe> element among link ancestors? Commented Jul 12, 2017 at 18:09
  • It could also mean there are more than one element that has the "services.ics" href or the "title" is used more than once via the a tag. Commented Jul 12, 2017 at 18:25
  • 1
    @MQ1217, trumba.spud.1.iframe is iframe ID. If you need general selector you can try wait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it(driver.find_element_by_tag_name('iframe'))), but this will allow you to switch to first iframe on the page. If target element located inside of another iframe, you should use more specific selector Commented Jul 12, 2017 at 19:10