python - How to find element iframe by attribute src containing specific text -
what best way find element iframe attribute src containing text about . html code
<iframe id="fancybox-frame1464160624818" name="fancybox-frame1464160624818" class="fancybox-iframe" allowfullscreen="" scrolling="auto" src="about.jsp?fancybox=true"> </iframe>
locating id, name, class name not relevant.
i can find iframes in page tag name iframe , check src attribute get_attribute method find iframe unique src attribute.
is possible ?
use xpath. believe expression this
driver.find_element_by_xpath("//iframe[contains(@src,'about'])]")
Comments
Post a Comment