score:2

Accepted answer

the span element you want is located in an iframe, which means the span element can't be found directly. to access it you must first direct the webdriver object to switch to the iframe:

iframes = driver.find_elements_by_xpath("//div[@class='panel-body']//iframe")
len(iframes)  # 5
driver.switch_to.frame(iframes[0])
driver.find_element_by_xpath('//span[@domid="lastprice"]')  # should work now

Related Query

More Query from same tag