I'm trying to use the Set Chrome Field to Text action to complete text fields in a Chrome web form. The command works perfectly and inserts my desired text into all the fields. However, all the inserted text disappears when the next action happens. It doesn't matter what the action is, nor does it matter if the action comes from me directly or from Keyboard Maestro.
It appears that the Set Chrome Field to Text doesn't actually notify the page of the entry, so the text disappears when the page refreshes. I've tried tabbing after setting the text, but that didn't work. If I have to click the field somehow prior to setting the text, then I might as well use the Insert Text action. The beauty of the Set Chrome Field to Text action is not having to navigate to every field individually.
What am I missing? How can I set the text in the desired field once it's been placed there by Keyboard Maestro?
I suspect you are completely right here. What you should say was that it "doesn't actually notify the web server of the entry." I believe that you are right in that assumption. If the web server "refreshes the page" as you say, it won't know about the new data items that you entered into the fields, resulting in the loss of the data, exactly as you describe.
KM isn't the issue here, if we are right about the cause of the problem, which is that the server isn't being informed of the change to the page. The exact same thing would happen if you entered the text with your mouse and keyboard. Right? Give that a try and see if it's true. If it's true, we can look for a solution to that problem.
Of course, web pages have different underlying javascript. Some websites actually do update the server with the data as you type it. For example, this website (forum.keyboardmaestro.com) will update the server as I'm typing, so if I close my web browser, these words that I'm typing will be "saved" on the web server. But maybe your website doesn't have those "smarts." Since you haven't mentioned which web server you are using, there's no way for us to determine if the javascript is updating the web server. Would you be willing to share the name of the website?
Thanks for the helpful reply. The server I'm working with is Etsy.
When I type the content myself with my mouse and keyboard, it stays with no problem. That leads me to the conclusion that the field doesn't get the focus when the Set Chrome Field to Text action is used. This hypothesis is confirmed by the fact that using KM to click on the field and Insert by Pasting works fine and the content remains. The act of clicking on the field creates the focus for that field.
So it seems the question is whether there's a way in KM to set the focus on a field before or after the Set Field to Text action.
That's a great suggestion; however, it doesn't work with the Set Chrome Field to Text for some reason. It works great with the Insert Text action, so that's a step forward and will work just as well as the Set Chrome Field action.
Thanks so much for your help. I greatly appreciate it.
There may be entirely different solutions. For example, some web sites have keys that are interpreted by the site's javascript as a request to update. I think gmail uses the "r" key to force a refresh without losing the data on the page. In order to figure out whether Etsy supports a key that does a refresh, you either have to read the javascript code (which I'm not smart enough to do) or simply try guessing a few likely keystrokes that might work ("space", "enter", "tab" come to mind.) I recommend you test a few keys. There's a 10% chance you might be able to find one that works. But if you don't want to do any testing, you can always resort to the Insert Text action.