File Upload into Plesk (for .pem certificate updates) has no id in input type=file

What am I doing wrong? (I am new to UI.Vision.)

I am tying to upload renewed certificates into Plesk UI. Login and navigation work, but uploading .pem files is not. Unfortunately the input field has no id so there is no direct way to address it.
I understand I need to change Value fakepath to the real path like this:

    {
      "Command": "type",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
      "Value": "C:\\**real_folder**\\wildcard___domain_name.pem",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
        "xpath=//input[@type='file']",
        "xpath=//div/input",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > input"
      ],
      "Description": ""
    }

and add XType to close the box (but the select file navigation box will not even open running it the way it was recorded.)

 {
      "Command": "XType",
      "Target": "",
      "Value": "$(KEY_ESC)",
      "Description": ""
    },

When I record it I get this recorded:


    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/button/span/span/span",
      "Value": "",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/button/span/span/span",
        "xpath=//div[2]/div/button/span/span/span",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > button > span > span > span"
      ],
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
      "Value": "",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
        "xpath=//input[@type='file']",
        "xpath=//div/input",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > input"
      ],
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
      "Value": "C:\\fakepath\\wildcard___domain_name.pem",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
        "xpath=//input[@type='file']",
        "xpath=//div/input",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > input"
      ],
      "Description": ""
    }

This is the HTML in the page

<div class="pul-media-section">
  <div class="ext-sslit-certificate-dropzone" multiply="false" aria-disabled="false" style="position: relative;">
    <button class="pul-button" type="button" data-test-id="ext-sslit__certificate-upload-button">
      <span class="pul-button__inner">
        <span>
          <span>Upload .pem file</span>
          </span>
        </span>
      </button>
      <input accept=".pem" type="file" multiple="" autocomplete="off" 
          style="position: absolute; inset: 0px; opacity: 1e-05; pointer-events: none;">
  </div>
</div>

The input field has three event listeners:

//  click:
function() {
  const i = Array.prototype.slice.call(arguments);
  try {
    n && "function" == typeof n && n.apply(this, arguments);
    const r = i.map((e => f(e, t)));
    return e.apply(this, r)
  } catch (e) {
    throw l(), (0, r.withScope)((n => {
      n.addEventProcessor((e => (t.mechanism && ((0, a.addExceptionTypeValue)(e, void 0, void 0), (0, a.addExceptionMechanism)(e, t.mechanism)), e.extra = {
        ...e.extra,
        arguments: i
      }, e))), (0, r.captureException)(e)
    })), e
  }
}
//  click:
function() {
  const i = Array.prototype.slice.call(arguments);
  try {
    n && "function" == typeof n && n.apply(this, arguments);
    const r = i.map((e => f(e, t)));
    return e.apply(this, r)
  } catch (e) {
    throw l(), (0, r.withScope)((n => {
      n.addEventProcessor((e => (t.mechanism && ((0, a.addExceptionTypeValue)(e, void 0, void 0), (0, a.addExceptionMechanism)(e, t.mechanism)), e.extra = {
        ...e.extra,
        arguments: i
      }, e))), (0, r.captureException)(e)
    })), e
  }
}
//  invalid:
function() {
  const i = Array.prototype.slice.call(arguments);
  try {
    n && "function" == typeof n && n.apply(this, arguments);
    const r = i.map((e => f(e, t)));
    return e.apply(this, r)
  } catch (e) {
    throw l(), (0, r.withScope)((n => {
      n.addEventProcessor((e => (t.mechanism && ((0, a.addExceptionTypeValue)(e, void 0, void 0), (0, a.addExceptionMechanism)(e, t.mechanism)), e.extra = {
        ...e.extra,
        arguments: i
      }, e))), (0, r.captureException)(e)
    })), e
  }
}

I know Plesk offers an API … but I am not sure if I have access to it as non-administrator.

I finally go it working, somehow Allow access to file URLs did not “take” the first time around.

This did it:

    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/button/span/span/span",
      "Value": "",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/button/span/span/span",
        "xpath=//div[2]/div/button/span/span/span",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > button > span > span > span"
      ],
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
      "Value": "",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
        "xpath=//input[@type='file']",
        "xpath=//div/input",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > input"
      ],
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
      "Value": "C:\\Apache24\\conf\\ssl.pem\\wildcard___domain_name.pem",
      "Targets": [
        "xpath=/html/body/div[7]/div/div[2]/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/div/div[2]/div/input",
        "xpath=//input[@type='file']",
        "xpath=//div/input",
        "css=body > div:nth-child(13) > div > div.pul-overlay__content.pul-overlay--enter-done > div.pul-overlay__body > div.pul-drawer__body > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) > div > input"
      ],
      "Description": ""
    }