GetComboContents and GetComboText
My first posting to this group, be gentle!
I am having problems with a bit of code to retrieve the contents of
a combo box. I can identify the box, get it's contents (or at least
the same number of items as I am expecting so I assume it's the
right box) but every time I try to get them I get a single byte back.
Heres the code.
use Win32::GuiTest qw/SendKeys FindWindowLike GetComboContents
my ($ie_window) = FindWindowLike(0, "Some Webpage", "IEFrame");
my (@combo_boxes) = FindWindowLike($ie_window,"", "Internet
my (@contents) = GetComboContents(@combo_boxes);
All very easy. Or so it would seem, but all I get back in the $text
variable, where I would expect the text each of the items in the
combo box, is a single byte of data for each item. I cant post what
I see (smiley faces and umlauts etc) but I think it's just a hex
reference that STDOUT tries to render as text.
Theres the correct number of these, also they differ slightly so I
am pretty sure I am iterating through the array correctly .. wheres
my text? What's the method to get the text? Where am I going wrong?
Any help gratefully Appreciated.