Help Pushing Data Into Web Fields via JavaScript (SOLVED)

Hello, group. Hope you're having a lovely weekend.

We've got a new web shop using Sylius, which is a lot more powerful than our old store (running on Magento 1.x), but of course there are a hundred useful scripts that I now have to re-create.

The way we push product out to the site is to open a new page in the admin and use JavaScript running from inside an AppleScript to push out the values, but for some dumb reason two description fields refuse to play ball despite repeated debugging.

Nothing we do will make the description fields reliably populate.

The code we're using is basically:

set shortDescriptionVal to "document.getElementById('sylius_product_translations_en_US_shortDescription').value=" & quoted form of shortDescription
set descriptionVal to "document.getElementById('sylius_product_translations_en_US_description').value=" & quoted form of productDescription

execute JavaScript descriptionVal
execute JavaScript shortDescriptionVal

(It's part of a bigger script).

All the other fields take their data properly, except for the





So my question is, what would be the "Keyboard Maestro" way to approach this and hopefully get our automation working?

You're running this in a web browser?

Which one?

Google Chrome. But I got it to work so I'll mark it as Solved. It was some funky back-end stuff that was not accepting the data in those fields.

How did you get it to work?