Is it possible to store class to a variable?

Like if the text is ‘abc’. And is it possible for me to use //*[text()=‘abc’] to get the class?


You have a text and want to get the class? What about using sourceExtract and regular expressions?

You can usé storeattribute command.
Storeattribute. | //*[text()=‘abc’]@class | varclass

Thank you, I’ll just use StoreAttribute.

Thanks, It’s working.
“Command”: “storeAttribute”,
“Target”: “//*[text()=‘Balabala’]@class”,
“Value”: “a”,
“Description”: “”