Skip to main content

I need to fill out a date field with today’s date in a Salesforce popup form. When filling out the form manually, a date picker appears when the “Actual Review Start Date” field is selected, but users are still able to physically type or paste the date into the date field. 

Using AA, capture is recognizing the field as a combobox, not a textbox, so I am not able to set text easily. Capture also isn’t recognizing the date picker display. I’m not able to get a red outline to appear on any of the date picker elements. 

I tried capturing left click on the combobox and then set text in the window, but 50% of the time, the date text gets set into incorrect fields.

Any other ideas for things I could try?

 

@Nesquik Ah, date pickers. The CAPTCHAs of the bot world.  🤣

A couple of ideas:

• Try a different “technology” to capture the field. Maybe one of them will capture the text box, not the combo box.

• Use a Recorder: Capture to click on the object. It will then be in focus. You can then use Simulate Keystrokes to send the date as keystrokes.

PS: I like your username!  🐰🥛


@Nesquik Ah, date pickers. The CAPTCHAs of the bot world.  🤣

A couple of ideas:

• Try a different “technology” to capture the field. Maybe one of them will capture the text box, not the combo box.

• Use a Recorder: Capture to click on the object. It will then be in focus. You can then use Simulate Keystrokes to send the date as keystrokes.

PS: I like your username!  🐰🥛

Thanks! This was helpful! I had success with Microsoft Active Accessibility 🙂

Now for my next issue: my set text actions only work when “time between keystrokes” is set to 1. If I set it to 0, the text disappears from the text box. I have a large text field that takes 30 seconds to fill in when time between keystrokes is set to 1. Any clue what could be causing the text to paste into the text box but then disappear?


@Nesquik Under normal circumstances, text entered all at once (delay = 0) just appears in the text box. There is likely some JavaScript validation code in the background making the mess.

You may be able to use the Browser: Run JavaScript action to insert the value into the page. To test this, some HTML/JavaScript knowledge is necessary. 

First step, locate the field you want to work with. Find a unique identifier for that field. An “id” is best, but it can be any property that is unique on the page.

In this case, I’ll use the “id” which is “username”. Then, go to the Console in the developer tools and use JavaScript code to set the value to that field.

Now, you have your JavaScript code. Try a Browser: Run JavaScript action to inject the value into the field.

Note: You cannot use AA variables in the JavaScript, so if you need to have a dynamic value, you will have to concatenate some string values together, write that to a file, the use the “Import existing file” option to run the dynamic JavaScript.


@Nesquik This is simplified code showing how to write a dynamic JavaScript file then execute it.

Of course you can append more lines to the JavaScript file to have a lengthier script. Note that the String: Assign resolves the $sName$ variable in the source string to the actual value. You can use the String: Evaluate variable to do the same thing if you prefer.