Read text and go to if

Hello, I would like to create an automation loop that does the following:
go to a page
annalyze a text (two possible solutions “accepted” or “reverted”)
if “reverted” resume line 2, if “accepted” continue automation next line.

I’ve tried various methods, but none of them really takes the written information into account. Sometimes it was reverted but the script marked that all was well and continued. Which then doesn’t give the expected result.
Can you give me some tips on what would work best in this case?

in addition, I’m providing you with the script, perhaps I’ve mixed things up or there’s a conflict in the execution that I can’t find.
{
“Name”: “g.testreadandbaack”,
“CreationDate”: “2024-7-10”,
“Commands”: [
{
“Command”: “label”,
“Target”: “u1”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="root"]/div/div/div[3]/button",
“Value”: “historique”,
“Targets”: [
"xpath=//
[@id="root"]/div/div/div[3]/button”,
“xpath=//div[3]/button”,
“css=#root > div.css-0 > div.css-9v7z66 > div.chakra-stack.css-xnkdtk > button.chakra-button.css-3aup2f”
],
“Description”: “”
},
{
“Command”: “XDesktopAutomation”,
“Target”: “true”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “i18sed_dpi_96.png”,
“Value”: “starkscan link”,
“Targets”: [
“xpath=//[@id="chakra-modal–body-:r2:"]/div[2]/div/div[2]/div/a/div[2]/div/div/div/div/div[2]/p[2]",
“xpath=//p[2]”,
“css=#chakra-modal–body-:r2: > div.css-1jvt4qe > div > div.chakra-stack.css-1ill1p7 > div:nth-child(1) > a > div.chakra-stack.chakra-card__body.css-1uf1tg9 > div > div > div.css-0 > div > div.css-0 > p.chakra-text.css-c2fgnh”
],
“Description”: “”
},
{
“Command”: “XDesktopAutomation”,
“Target”: “false”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: "xpath=//
[@id="root-child"]/div/div[3]/div/div/div[2]/div[4]/div[2]/div/div/div[2]/div/div/div”,
“Value”: “mypath”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “mypath={$mypath}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoIf”,
“Target”: “x="(mypath)"== ‘Reverted on L2’”,
“Value”: “u1”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “xpath=//*[@id="root-child"]/div/div[3]/div/div/div[2]/div[4]/div[2]/div/div/div[2]/div/div/div”,
“Value”: “mypath2”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “mypath2={$mypath2}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoIf”,
“Target”: "x="(mypath2)"==‘Accepted on L2’ ",
“Value”: “u2”,
“Description”: “”
},
{
“Command”: “label”,
“Target”: “u2”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XDesktopAutomation”,
“Target”: “false”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “wn1rgm_dpi_96.png”,
“Value”: “”,
“Description”: “”
}
]
}

We can not run the macro here. Maybe you can provide a video of the task that you need to automate?

I found the solution
I wasn’t selecting the right reading location, the bot was reading the frame and not the text
everything’s fine on my side
let me know if a detailed script could be useful I’ll gladly share if it can help others with the same problem