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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -