tags:

views:

19

answers:

1

I'm trying to grab the image filename - my webpage, based on inputs, is loading on of several images and I want to grab the filename of the image. If I know the id or the alt-text, can I grab the image filename? Right now, I'm using "get_html_source" (python, btw) and parsing it from there. Is there an alternative, or is selenium not really built for this?

A: 

Use get_attribute:

sel.get_attribute('//path/to/my/img@src')
Ryley