Cant use type command on donation link to fill card info

so im trying to autofill some information from a csv file and it works with the email and name text boxs but when it comes to selecting the credit card number box i cant seem to find the element for the type command to work. sorry fairly new to this and this is probably a noob problem but any help would be appreicated

is the site im trying to donate to in this example

I created a working macro for you. As you said, the xpath for the credit card number field was not found. My solution is to use the visual XClick and XType commands for these fields instead. So I chagned the recorded macro in the following way:

  • Commented out the recorded SelectFrame and Type command
  • Replaced them with visual XClickText to click (= set the focus) on the “Number” field name
  • and then send keystrokles with XType

This works:

{
  "Name": "fill credit card",
  "CreationDate": "2023-11-25",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://secure.avaaz.org/campaign/en/donate/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "name=paymentType",
      "Value": "label=Credit card",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "selectFrame // index=8",
      "Value": "",
      "Description": "frame commands  are not needed for visual XClick"
    },
    {
      "Command": "comment",
      "Target": "type // name=cardnumber",
      "Value": "3456 6",
      "Description": ""
    },
    {
      "Command": "XClickText",
      "Target": "number",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "3456 6",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "selectFrame // relative=top",
      "Value": "",
      "Description": "frame commands  are not needed for visual XClick"
    },
    {
      "Command": "comment",
      "Target": "selectFrame // index=9",
      "Value": "",
      "Description": "frame commands  are not needed for visual XClick"
    },
    {
      "Command": "comment",
      "Target": "type // name=exp-date",
      "Value": "11 / 11",
      "Description": "this line was recorded, but xpath was not found -> replace with XClick andXType"
    },
    {
      "Command": "XType",
      "Target": "${KEY_TAB}${KEY_TAB}",
      "Value": "",
      "Description": "tab into the next line and enter the expiration date"
    },
    {
      "Command": "XType",
      "Target": "1128",
      "Value": "",
      "Description": ""
    }
  ]
}