Modern web-technologies uses AJAX for loading data instead of refreshing the whole page. With this approach, if an element is not present in DOM, an exception will be raised. To understand this better, I have created a small example on JSFiddle , which uses JQuery to fetch some data from a REST API and then update the page with the results using AJAX. If we do not use any delay, our test case will fail. One solution could be to use time.sleep() after clicking the button to wait for the response. from selenium import webdriver import unittest import time CHROMEDRIVER = "/Users/sarbjit/webdrivers/chromedriver" WEBSITE = "https://jsfiddle.net/sarbjit87/cf3ud4qp/" class TestJSFiddle (unittest.TestCase): def setUp(self): self.driver = webdriver.Chrome(executable_path=CHROMEDRIVER) def test_page(self): self.driver.get(WEBSITE) time.sleep(5) # Wait for website to load iframe = self.driver.find_element_by_xpath( "//