Select Item Option Not "Sticking"

I don’t know of a better way to describe what I’m coming across… Sometimes the selected option is not retained after submitting a form.

The issue I’m running into at the moment is with the ‘Print’ options in IE - when trying to select the Printer from the dropdown, the correct selection appears to have been selected and shows up in the ComboBox, but when clicking on the ‘Print’ button below, it still tries to print to the default printer that originally appeared in the ComboBox.

The selector I’m using for the ‘Select Item’ activity is:

wnd app=‘iexplore.exe’ cls=‘#32770’ title=‘Print’
wnd aaname=‘Printer:’ cls=‘ComboBoxEx32’
wnd aaname=‘Printer:’ cls=‘ComboBox’
(with opening an closing < /> tags as well, of course)

And the input is: “Microsoft Print to PDF”

As soon as I hit ‘Print’ though, it still tries to print to “Adobe PDF” which is the default.

Anyone have any insight into what might be happening?

*** Solved with workaround ***

The workaround that enabled it to retain the selection in the ComboBox was to instead use a ‘Click’ activity. What’s happening now is that the ComboBox is clicked to reveal the dropdown items, then another ‘Click’ activity is used to click on ‘Microsoft Print to PDF’ with the ‘SendWindowsMessage’ property checked.


The question still remains though, as to why the ‘Select Item’ activity wouldn’t work in this case, unless there may be some code running in the background of the ‘Print’ window waiting for a click to occur…

3 Likes

Hi, how were you able to add a click activity for the dropdown items? The dropdown items float so when I go to point the click activity at them in Studio they’ve disappeared. Doing a desktop recording just gives me the combo box select activity that you started with.