Bot Detection - UI Vision & Replica

Hello everyone, for a study project at the university we want to have a conversation between two AI tools, more precisely between ChatGPT and Replika. Since we have to have this conversation 112 times, we wanted to automate it with UI Vision. We are currently failing at a few points.

Since I was helped so well here last time, I wanted to turn to you with another question. We are currently working on the Replika login process.

Replika always blocks our macro at a certain point - first it asks for the age, then you have to choose an avatar and then it jumps back to the avatar. It seems that Replika recognizes that a bot is doing the clicking.

I’ve tried everything - xclick, pause, mouscurser, clicking via scripts etc. Does anyone have an idea how to bypass bot detection?

We would be very grateful for any help.

Hello everyone, for a study project at the university we want to have a conversation between two AI tools, more precisely between ChatGPT and Replika. Since we have to have this conversation 112 times, we wanted to automate it with UI Vision. We are currently failing at a few points.

Since I was helped so well here last time, I wanted to turn to you with another question.

Replika always blocks our macro at a certain point - first it asks for the age, then you have to choose an avatar and then it jumps back to the avatar. It seems that Replika recognizes that a bot is doing the clicking.

I’ve tried everything - xclick, pause, mouscurser, clicking via scripts etc. Does anyone have an idea how to bypass bot detection?

We would be very grateful for any help.

This is my code (with anonymized email address and password) as well as two screenshots

{
“Name”: “2025_30_LogIn_Events3”,
“CreationDate”: “2025-6-2”,
“Commands”: [
{
“Command”: “open”,
“Target”: “Replika”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForVisible”,
“Target”: “id=signup-email”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=signup-email”,
“Value”: “email”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=signup-password”,
“Value”: “password”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=‘root’]/div/div[2]/form/div/button",
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForVisible”,
“Target”: “id=signup-name”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=signup-name”,
“Value”: “Kim”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=signup-pronouns-she”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=‘root’]/div/div[2]/form/div/button”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForVisible”,
“Target”: “id=user-age-18-24”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=user-age-18-24”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//button[contains(text(),‘Continue’)]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “bringBrowserToForeground”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript”,
“Target”: “window.scrollBy(0,500);”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “500”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript”,
“Target”: “Array.from(document.querySelectorAll(‘button’)).find(b => b.innerText.includes(‘Continue’)).click();”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript”,
“Target”: “window.scrollBy(0,-500);”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “500”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForVisible”,
“Target”: “id=signup-replika-name”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=signup-replika-name”,
“Value”: “Alex”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=signup-replika-pronouns-male”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//button[contains(text(),‘Continue’)]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForVisible”,
“Target”: “linkText=close”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=close”,
“Value”: “”,
“Description”: “”
}
]
}


1 Like

Hi, have you tried to use a 100% visual/OCR solution? By this, I mean using only XClick. XType,… and related commands, no CLICK or TYPE. All classic Selenium-IDE style commands (must) insert Javascript into the website to do the automation work. That is true regardless of the software you use (Selenium IDE, imacros, ui vision, ui path…). My guess is that Replika detects this.

I tried a quick “pure” XCLICK login automation, and it worked fine (but I ran it only a few times, for a quick test). I am curious to see if it works for you

1 Like

Dear Ulrich,

Thank you for your reply and for trying out how it might work.

What code did you use exactly, and how did you set up the automation?

With XClick, I often have the problem that the green UI Vision box appears, but the click is not executed.

If you see this issue, a short demo video will be useful. Maybe we can see what goes wrong and fix it.

I created a short demo macro that actually uses only OCR text recognition, no images. Does this macro work for you?

{
  "Name": "replika robot1",
  "CreationDate": "2025-6-6",
  "Commands": [
    {
      "Command": "store",
      "Target": "99",
      "Value": "!ocrengine",
      "Description": "xmodule ocr"
    },
    {
      "Command": "open",
      "Target": "https://my.replika.com/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XClickText",
      "Target": "create",
      "Value": "",
      "Description": "find and click the button with text CREATE"
    },
    {
      "Command": "XClickText",
      "Target": "email",
      "Value": "",
      "Description": "click into email field to set the focus for XType"
    },
    {
      "Command": "XType",
      "Target": "testforum123a@test.com${KEY_TAB}",
      "Value": "",
      "Description": "use TAB to jump to next field"
    },
    {
      "Command": "XType",
      "Target": "1234578!A",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_ENTER}",
      "Value": "",
      "Description": "instead of clicking continue button (its faster)"
    },
    {
      "Command": "XType",
      "Target": "just-a-test",
      "Value": "",
      "Description": "name"
    },
    {
      "Command": "XType",
      "Target": "${KEY_ENTER}",
      "Value": "",
      "Description": "continue"
    },
    {
      "Command": "XClickText",
      "Target": "25*",
      "Value": "",
      "Description": "age, use FIND button to test OCR"
    },
    {
      "Command": "XClickText",
      "Target": "cont*",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XClickText",
      "Target": "cont*",
      "Value": "",
      "Description": "avatar selection (use default)"
    },
    {
      "Command": "XType",
      "Target": "demo ui.vision",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_ENTER}",
      "Value": "",
      "Description": "continue"
    }
  ]
}
1 Like

Wow, thank you so much for your help!

Unfortunately, it’s not working. :frowning: I have the feeling that XClick isn’t running on my computer, even though I’ve installed the XModule.

Currently, it fails with the “create” command.

Attached is a video of the problem. Otherwise, I think your macro would work.

I have a MacBook Air, M2, MacOS 15.5 sequoia.

Here’s a screenshot showing that XModule is actually installed. Is there anything else I need to consider?