Forum Discussion

sivasuraa87's avatar
sivasuraa87
Occasional Contributor
11 years ago

Keys Method

Hi  ,



When i use keys method to get the input from excel and enter in my application it is missing some letters basically enters wrong spelling... and i cannot use other methods such as text or set text as my application didnt support it .. can anybody help me with this  

kind regards,

siva
  • Hi Siva,

    When you save the wrong spelling is being entered, what exactly do you mean?

    Is the end of the word being cut off or are random letters through the word missing?



    Even though the SetText() method doesn't work for you have you tried setting the text or value properties directly?  Eg EntryField.Text = "Some Text" or EntryField.Value = "Other text".



    You may be trying to interact with 3rd party controls which don't support the Text property.  In this instance you should talk to one of the developers on the project and ask how to interact with the controls.  They may be able to offer assitance.
  • sivasuraa87's avatar
    sivasuraa87
    Occasional Contributor
    hi ,



    Many thanks for your reply.. random letter through the word is missing ..



  • Test Complete is known to simulate key presses incorrectly, if Test Complete is the active forground window.  Or maybe something else is happening. 

    As the SetText() method is not working for you, try to set the Text property directly as I mentioned earlier.  If that doesn't work then try copying the data to the clipboard and then pasting it into the field.  For example:



    set sys.clipboard = "Text to display"

    EntryField.Keys "^V"