How to store strings in a global variable and not on the method?

Currently, Im validating error messages in a modal but I have many strings that I assigned in a method,
Is there a way that these strings can be store in another file so we can call it and not assigned on the method itself?

Also I don’t want to store it under Profiles as I have many modules

Help and suggestions will be appreciated

Hi Kazurayam Good day to you.

I just want to know if ur link is related to your project in github repo ?

If yes, I saw the properties file is in global variable
Properties file

Profile

My problem is

  1. I don’t know how to store a string in a property file
  2. If I have the property file , I don’t want to include it in the profile
  3. I don’t know how to call the string that I assigned in property file and call it to other class, method

Pardon as I’m still learning on this field

I do not understand why you are not happy with you code:

.

In this screenshot, you have 23 variables declared. It seems you just want to write these 23 values in another text file, not in some.groovy file. Is it what you want? — I guess, it is no better than the current code, is it?

I suppose you haven’t described what you really want to do.

Without understanding WHY, it is not a good idea to start discussing HOW.

for the variables that I assigned I want to reuse it to other method so i don’t need to type it again in another class 1by1 thats the purpose of this post and sorry that I did not mention it.

Thanks for your time and appreciated

I made a Groovy class brylesu.Client in the Keyword folder, which contains 2 properties: errLblClientID and errLblClientType.

I made 2 Test case scripts TC1 and TC2. The two scripts shares the brylesu.Client class and use its 2 properties.

I am not sure if this solves your problem or not.

Ohhh this is what I want!!! this solve my problem!
Thanks!