automation - C# Get Value from ID when ID changes Slightly -


i trying value id changes every time.

for example have :

<img id="economy_item_#######_item_icon" alt="dual berettas | colony"> 

i trying retrieve "dual berettas | colony" have put #'s number changes every time. how can achieve this?

any , appreciated.

thanks

you may use jquery attribute contains feature. https://api.jquery.com/attribute-contains-selector/

like this:

var txt = $("img[id*='economy_item_']").attr('alt'); 

Comments

Popular posts from this blog

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -