XType failed for SQL login

Hello Guys,
I just want to open SQL Server Management Studio then input Server Name, Login and Password for login.
when I use XType to input Server Name, it failed. What did I do wrong?
Thanks.
below is my source code.

{
  "Name": "Desktop _ SQL",
  "CreationDate": "2020-6-7",
  "Commands": [
    {
      "Command": "XRun",
      "Target": "C:\\Program Files (x86)\\Microsoft SQL Server Management Studio 18\\Common7\\IDE\\Ssms.exe",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "1000",
      "Value": ""
    },
    {
      "Command": "visualSearch",
      "Target": "cgfej4_dpi_144.png",
      "Value": "SQLLogin"
    },
    {
      "Command": "if_v2",
      "Target": "${SQLLogin}>0",
      "Value": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_V+KEY_S}",
      "Value": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    }
  ]
}

Error Log:
image

SQL Server Management Studio:

You must detect fields to fill with image, sometimes you need to record more times the same image.

I’m my opinion xtype can not fail, i automate addons and desktop without problem.

Need time and try more times the recording image.

In the forum can not help you because the detection of image depending from your resolution, if i create a similar macro in my machine in your machine do not work.

Your macro seems a wrong macro to do a login.

Try with Xclick and Xtype for every field, your macro seems don’t do this.

Well, this is a nice coincidence. We use the RPA software our self to automate SQL logins. So I recorded a quick screencast:

As @newuserkantu assumed correctly, it works with no problem :slight_smile: => If you still can not get it to work, please post a screencast of how it runs on your website.

What my macro does is it:

  • double-clicks the SMSS icon
  • use VisualAssert to wait for the SMSS to start
  • XClick on the login dialog to make sure it has the focus <= This is missing in your macro.
  • XType to send server name
  • XClick (button image) to click connect. Login times out because I use a fake user name in this demo macro.

Macro with images (Import as ZIP): SQL-Login.zip (5.8 KB)

Macro:

{
  "Name": "SQL-Login",
  "CreationDate": "2020-6-7",
  "Commands": [
    {
      "Command": "XClick",
      "Target": "icon_dpi_96.png",
      "Value": "#doubleclick"
    },
    {
      "Command": "store",
      "Target": "60",
      "Value": "!TIMEOUT_WAIT"
    },
    {
      "Command": "visualAssert",
      "Target": "sql_dpi_96.png",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "sql_dpi_96.png",
      "Value": ""
    },
    {
      "Command": "XType",
      "Target": "Super SQL",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "connect_dpi_96.png",
      "Value": ""
    }
  ]
}

Actually, what should this do? What it does is to press the V and S keys at the same time. Did you want to use CTRL+V (paste)?

Note: If you want to send server names with/ inside, then use

  • store | false | !stringEscape before the XType. But I do not think that this is the issue here.

!StringEscape (read/write) – If true /n /r are interpreted as escape sequence (default). If false they are interpreted literally (forum).

thank you, I got it!

thank you so much. I solved it.