XType/Send Keys challenge

OK, I have used Xtype and alternatively SendKeys for a few years now. I have finally found a field that will not recognize the change when numeric values are placed in the ID for the form.

I’ve also tried to change value of another item on the page (e.g. change from buy to sell) and that change does not initiate change to the field. I have tried all of the items on the form that allow a change to post, without resetting the entire page.

I have found a chrome addon, that will successfully do it, but there is no way to trigger the addon that I can figure out. The addon is called Quickform.

This is the json output from that addon.

{
“id”: “3ddad385-dcde-4595-9085-fb19cfd41aa3”,
“name”: “New profile - 2026-05-25T19:11:25.114Z2”,
“description”: “”,
“fields”: [
{
“key”: “#ordernumber01inputqty-stepper-input”,
“value”: “200”,
“fieldType”: “text”,
“searchType”: “cssSelector”
}
]
}

I do not know if it is how this addon does the post, I was wondering if there is some way to run this in the sandbox, I would need to change the value field on the fly (make it a variable, assigned earlier in the macro).

Again, I can get the form to accept the value, but it doesn’t stick (using either type or xtype or sendkeys).

Any ideas?

FYI, this is on Charles Shwab website and I am trying to enter dollars for fractional trades (new feature).

Thanks for any help or insights you have.


Monte

I figured it out… see below.

{
  "Command": "executeScript",
  "Target": "const field = document.getElementById(\"ordernumber01inputqty-stepper-input\");\nfield.value = ${Shares}\nfield.dispatchEvent(new Event(\"input\", { bubbles: true }));\nfield.dispatchEvent(new Event(\"change\", { bubbles: true }));\nfield.dispatchEvent(new Event(\"blur\", { bubbles: true }));",
  "Value": "",
  "Description": "//input[@id='ordernumber01inputqty-stepper-input'] id=ordernumber01inputqty-stepper-input"
}