Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98779

Finding elements by xpath

$
0
0

Please help me I am trying to select a picture which is a link (a trainer on a website)

This is my code:

login = browser.find_element_by_xpath("a[title=\"ACG Air Moc 3.0 'Cargo Khaki/Oil Green' Release Date\"]")

This is the inspect element code

img src="https://secure-images.nike.com/is/image/DotCom/CI9367_301_A_PREM?$SNKRS_COVER_WD$&align=0,1" alt="ACG Air Moc 3.0 'Cargo Khaki/Oil Green' Release Date" title="ACG Air Moc 3.0 'Cargo Khaki/Oil Green' Release Date" class="image-component mod-image-component u-full-width" style="opacity: 1; transition: opacity 1s ease 0s;"

And this is the error im getting:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"a[title="ACG Air Moc 3.0 'Cargo Khaki/Oil Green' Release Date"]"}

I'm using Pycharm


Viewing all articles
Browse latest Browse all 98779

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>