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
Post a Comment