Forum Discussion

selmaa's avatar
selmaa
New Contributor
7 months ago

SetText metod dont work properly in application

We aim to incorporate XML data into a specific functionality within our desktop application. To achieve this, I created a parameter containing XML test data with the relevant information. I then read this data within the application's functionality and attempted to use the 'setText' method to input the data. This approach worked seamlessly in a different environment.

However, upon transferring these test cases to another environment, the 'setText' method no longer functions as expected for that particular functionality. Substituting it with the 'Keys' method causes the data to be split across different fields, resulting in test failures.

It seems that the 'setText' method is not visible in the operation tasks, and the 'Keys' method is misdirecting the data to unintended fields after the initial row. How can I address this issue and ensure that data sent with the 'Keys' method remains within the intended functionality, similar to the 'setText' method in the original environment?"

 

We are using testcomplete Version: 15.52.9.7 x64

1 Reply

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    What do you mean by "environment"?

     

    SetText method will work on certain UI controls, alternative is to use Keys method. You need to check what characters are being passed into Keys method, as the method may simulate function keys, shift codes etc.