# Variables

It has the ability to store certain values during a test, or to generate random values. The values stored here are used in other steps.&#x20;

_<mark style="color:red;">Caution) The key value is not case sensitive.</mark>_

### Store Value

Used by authors to store specific values.

For example, if you need to create a scenario where you need to enter your login ID frequently, you can set the value in advance at the beginning and retrieve it from where you need it.

#### Store Value Attributes&#x20;

1. key: The key value to be used when the value is stored and used elsewhere.
2. value: Actual data stored as key values.

<figure><img src="https://3771172870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9HBXnl7BPMKhSgbYYPV1%2Fuploads%2FMralnNoU6hZBxcU70fOz%2FVariables1.png?alt=media&#x26;token=0414fe37-243a-4283-9ca9-abf95e3b7150" alt=""><figcaption><p>Store Value Attributes Example</p></figcaption></figure>

### Store Content

The ability to read and store strings at specific locations on the screen. You can use the key value when you use the value stored here in another step.

Please refer to the following example.

{% content-ref url="../tutorial/example3.-google-search-by-text-image" %}
[example3.-google-search-by-text-image](../tutorial/example3.-google-search-by-text-image)
{% endcontent-ref %}

#### Store Content Attributes&#x20;

1. key: Identifier for writing when using values saved in another step.
2. UIObject: Outputs the screen element to which the data will be read.
3. pattern: Regular expressions are available.\
   If you want to save the value only if there is a case-sensitive phrase "welcome" in a particular location, you can enter the /welcome/i regular expression.

<figure><img src="https://3771172870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9HBXnl7BPMKhSgbYYPV1%2Fuploads%2FjF5TphOdRyujLr5l6XMB%2FVariables2.png?alt=media&#x26;token=0f9509a2-c9d0-4de7-8746-69d59b7f96cb" alt=""><figcaption><p>Store Value Attributes Example</p></figcaption></figure>

### Random Number

This is a function that you can use when you want to create and use numbers randomly.

#### Random Number Attributes&#x20;

1. key: Identifier for writing when using saved values.

<figure><img src="https://3771172870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9HBXnl7BPMKhSgbYYPV1%2Fuploads%2F4mWhx6sIuoq4HHnYnDGB%2Fimage.png?alt=media&#x26;token=6673aeca-b07a-4ab8-80e4-5fda66a50307" alt=""><figcaption><p>Random Number Generation Attributes Example</p></figcaption></figure>

### Random Text

You can create randomly generated text.

Characters used for random generation are lowercase letters (a-z), upper case letters (A-Z), and numbers 0-9.

#### Random Text Attributes&#x20;

1. key: Identifier for writing when using saved values.
2. prefix (optional): You can set it when you want to use a fixed value at the beginning of the text.
3. number of characters: You can specify the number of characters to generate randomly. (You can choose from 1-10.)

<figure><img src="https://3771172870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9HBXnl7BPMKhSgbYYPV1%2Fuploads%2Flocth3yovHz3kfGnbGek%2FVariables3.png?alt=media&#x26;token=b1fce27b-301e-4a51-8327-af140f375b8a" alt=""><figcaption><p>Random String Generation Attributes Example</p></figcaption></figure>

### Export Variable

You can specify stored values in the current scenario (Store Value, Store Content, Random Number, Random Text) for use in other scenarios.

In order to use the saved value in another scenario, the scenario must first be a shared scenario, and the value to be used must be specified as Export Variable.

#### Export Variable Attributes&#x20;

1. key: Enter the key of the stored value to share with other scenarios.

<figure><img src="https://3771172870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9HBXnl7BPMKhSgbYYPV1%2Fuploads%2FgmRIpv4Z8MsNAMBxQ95O%2FVariables4.png?alt=media&#x26;token=7efb48eb-bd81-41ea-bcd3-7cbe6d2e9d29" alt=""><figcaption><p>Example of Variable Sharing Attributes</p></figcaption></figure>
