Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find Combo Box length?
#1
Not Solved
I've got a drop down box on my screen that contains a list of values and am trying to select one but it's not finding a match because of trailing spaces.

i.e. the list contains values such as:

Code:
Mr     "
"Mrs    "
"Sir    "

The input data I have does not contain trailing spaces so when I try to select it from the drop down it's telling me it can't be found.

If it was the other way round and it was the input that had the trailing spaces i'd simply trim it first but some of these drop down lists in my application can contain hundreds of values and we have thousands of these drop down boxes on our system so don't want to have to code for each one manually!

My solution is to try and find the maximum length of the combo box and add those spaces into my test data. So if I know the combo box is always 20 characters long and my input data is 5 characters I can just write a global function to pad out the remaining spaces.

I've looked in object spy and can find out how many items there are in the list using the item count but can't see anything that tells me the length of the combo box.
Reply


Messages In This Thread
Find Combo Box length? - by AndyBSG - 11-28-2014, 09:41 PM
RE: Find Combo Box length? - by supputuri - 12-01-2014, 06:23 PM
RE: Find Combo Box length? - by vinod123 - 12-04-2014, 10:04 AM
RE: Find Combo Box length? - by AndyBSG - 12-05-2014, 10:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Combo Box selection issue Shkumari 11 12,760 09-26-2013, 03:56 PM
Last Post: learnQtptips
  Unable to select a combo item by value or index martinshort 2 3,567 08-26-2013, 07:55 PM
Last Post: sudhirzpatil
  how to automate combo box in a application using qtp ricks_ngl 0 3,437 07-20-2012, 10:59 AM
Last Post: ricks_ngl
  Default value in Edit Box when Check Box is checked nacchio 2 5,092 07-18-2012, 12:21 PM
Last Post: sree.85
Question insensitive combo-box selection ?? irahulsingh 1 3,588 09-14-2011, 08:12 AM
Last Post: vIns

Forum Jump:


Users browsing this thread: 3 Guest(s)