reading data from a file and substituting in a field

Hello everyone I’m from Russia myself. I can speak English only through a translator

The question is this.
Conditionally, there is a file with phones, from where you need to take them and substitute them in the right field on the site.
do all this in a cycle every time to take a new phone and substitute

how to do it?

I recorded the actions from the screen during manual input. Now automation is needed.

Can you tell me the code of your wonderful program ?

Can you please add a screen video to clarify the task?

{
  "Name": "macros",
  "CreationDate": "2022-2-20",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://web-telegram.net/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"column-left\"]/div/div/div/div/div[2]/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"column-left\"]/div/div/div/div/div[2]/div[3]/div[3]/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"contacts-container\"]/div[2]/button/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "csvRead",
      "Target": "1.csv",
      "Value": "myCSV",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Status = ${!csvReadStatus}, line = ${!csvReadLineNumber}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_CTRL+KEY_V}",
      "Value": "${myCSV[1] [1]}",
      "Description": ""
    },
    {
      "Command": "editContent",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div/div",
      "Value": "q",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div[3]/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "editContent",
      "Target": "xpath=/html/body/div[7]/div/div[3]/div",
      "Value": "+7 111 111",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div/button/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div/span",
      "Value": "",
      "Description": ""
    }
  ]
}

I need the data from the cm to be inserted into my desired field

at the same time, I do not know how to ID this field

try to run the script and you will understand what I want

To avoid this issue of finding a stable xpath locator, I would use XClick | image.png to set the focus and then XType with the text.

Do you mean like this?

{
  "Name": "macros",
  "CreationDate": "2022-2-20",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://web-telegram.net/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"column-left\"]/div/div/div/div/div[2]/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"column-left\"]/div/div/div/div/div[2]/div[3]/div[3]/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"contacts-container\"]/div[2]/button/div",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "csvRead",
      "Target": "1.csv",
      "Value": "myCSV",
      "Description": ""
    },
    {
      "Command": "XClick",
      "Target": "name.png",
      "Value": "#doubleclick",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div/div",
      "Value": "",
      "Description": ""
    },

тогда ошибка

  • [info]

Executing: | click | xpath=//*[@id=“contacts-container”]/div[2]/button/div | |

  • [info]

Executing: | csvRead | 1.csv | myCSV |

  • [warning]

Line 5: csvRead: Value field should be empty (not used)

  • [info]

Executing: | XClick | name.png | #doubleclick |

  • [error]

Line 6: Image ‘name.png’ (conf. = 0.6) not found

  • [info]

Macro failed (Runtime 16.50s)

I decided to try it like here

and here’s the video.

why does it put a value and erase it?

I decided to try it like here

and here’s the video.

why does it put a value and erase it?