I have to run the script in windows and Mac OS.
I have another query in the same:
In my script i’m taking input from the text file. The Text file contains the items which user wants to select from the combo box. So, how can i Select the item from a “DROP DOWN COMBO BOX”, depending upon the input from the text file???
Let me elaborate my point with a small example:
Suppose the drop down combo enlists-
I want to select “small” item from the combo. So i will enter “Small” in my text file. While running the script, this input from the text file should be taken, compared with the combo list and then selected.
According to your suggestion, while taking the input from the file, its selecting character by character, but not the word as a whole. So its selecting wrong item from the combo box.
So in this case, when i use “typetext small” in the script, it first selects “Short” (since first letter is ‘s’), then selects “Medium” (since second letter is ‘m’) and so on. Finally ending up with selecting “Large” as the last char in “small” is ‘l’. :!:
Help me in this issue.
[quote=“JonathanOSX”]The answers depends on the operating system that you are scripting against.
On a Mac running OS X or a Windows XP machine we usually refer to a Combo-Box as a pull-down menu that also allows typing in values in a text field at the top. In this case of course once you have focus on the UI element you can just use the TypeText command to type in your string.
If you are talking about a drop-down or pop-up (that doesn’t have an editble text entry field) you can actually still use TypeText to type the full choice once you have popped the list up (which can best be done by clicking on the little arrow on the right). If what you type is present it will be selected (otherwise it will select the next closest alphabetic choice which is sometimes peculiar).
Windows 2000 and earlier unfortunately doesn’t offer quite as nice of a user interface mechanic.
If it’s got a text entry field you can type your choice just like on OS X but if it only gives you a fixed set of choices you really need to know the full contents of the list to be able to select from it without using an image. Typing a letter will highlight the next item in the list with that letter, repeatedly typing that letter will continue to select items in the list. For example on a pull-down with a list of US states I can type “cc” to select Colorado. So by using a series of letters or down arrows you can select items in the list.[/quote]