Ask a Question

Testing program on Delphi

SOLVED
Coder7524
Occasional Contributor

Testing program on Delphi

When you start playback test (with the program on Delphi), and you try to enter data into a cell of the program, a message appears: "Failed to enter text in the edit box, sine it is read-only". The test is stopped because of this error. When the test is recorded in TC, data input to the cell is held normally. In another system (HP Unified Functional Testing) automated testing software, and you try to enter data into a cell Delphi program playback test runs without errors.
How to resolve the error, to play test passed with no errors?

  

Where in TestCompleteDemo can I evaluate Web testing? I can’t find this option in Demo.  I want evaluate testing some web-sites for example.

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Testing program on Delphi

Hi,

 

Out of the box TestComplete provides two options to enter the data - either by direct assignment (using the Set method of the given field/property) via the .SetText method or by emulating keyboard entry by the end-user via the .Keys method. The option used during recording is specified via the Tools | Options | Engines | Recording | Record Text Input Into Simple Editors As dialog. See TestComplete's help for extended description, but in the nutshell, the former method (.SetText) is faster and more reliable (as it excludes potential problems with the incorrect input focus). However, as basically it uses a call to the internal method of the tested application, it might not always work as expected because of implementation specifics of the given tested application. For example, the Set method in the tested application might be specified as a read-only for external applications, or the tested application might expect that the data are entered only via keyboard and thus rely on the OnKeyPress method to perform some pre-processing of the entered data and handle the internal data buffer that contains actual data handled by the Get/Set methods.

To make the long story short: if your code uses calls to the .SetText method to enter data and errors-out at some point, try to replace the problematic call to .SetText with the call to .Keys method.

 

WebTesting: According to my knowledge, the evaluation version of TestComplete includes all possible functionality. In order to try web-testing, ensure that all prerequisites are met: http://support.smartbear.com/viewarticle/56244/.

Also I would recommend to go through http://support.smartbear.com/screencasts/testcomplete/ - there are a lot of great screencasts there that should help to get the ideas behind TestComplete and provide with the input on how to create a reliable and cross-browser tests.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

4 REPLIES 4
AlexKaras
Community Hero

Re: Testing program on Delphi

Hi,

 

Out of the box TestComplete provides two options to enter the data - either by direct assignment (using the Set method of the given field/property) via the .SetText method or by emulating keyboard entry by the end-user via the .Keys method. The option used during recording is specified via the Tools | Options | Engines | Recording | Record Text Input Into Simple Editors As dialog. See TestComplete's help for extended description, but in the nutshell, the former method (.SetText) is faster and more reliable (as it excludes potential problems with the incorrect input focus). However, as basically it uses a call to the internal method of the tested application, it might not always work as expected because of implementation specifics of the given tested application. For example, the Set method in the tested application might be specified as a read-only for external applications, or the tested application might expect that the data are entered only via keyboard and thus rely on the OnKeyPress method to perform some pre-processing of the entered data and handle the internal data buffer that contains actual data handled by the Get/Set methods.

To make the long story short: if your code uses calls to the .SetText method to enter data and errors-out at some point, try to replace the problematic call to .SetText with the call to .Keys method.

 

WebTesting: According to my knowledge, the evaluation version of TestComplete includes all possible functionality. In order to try web-testing, ensure that all prerequisites are met: http://support.smartbear.com/viewarticle/56244/.

Also I would recommend to go through http://support.smartbear.com/screencasts/testcomplete/ - there are a lot of great screencasts there that should help to get the ideas behind TestComplete and provide with the input on how to create a reliable and cross-browser tests.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

m_essaid
Valued Contributor

Re: Testing program on Delphi

Hi,

Is that a DBGrid ?

I bet it's in read only mode because there is a dataset behind. Act on the dataset and the value will be seen on the grid.

Coder7524
Occasional Contributor

Re: Testing program on Delphi

AlexKaras. Thanks, ".Keys" works. About Web Testing, very useful links - thanks, but I have screen with not allowed "Functional testing of Web pages". See attachment jpg.

AlexKaras
Community Hero

Re: Testing program on Delphi

Hi,

 

> I have screen with not allowed "Functional testing of Web pages"

Hm-m-m... I am not sure about the reason... Assuming, that you have all required extensions enabled (File | Install Extensions...), it looks like you have the license for the Desktop module only (http://smartbear.com/product/testcomplete/overview/) while in order to test web pages you need the license for the web module. If you are evaluating TestComplete, you may contact Sales (http://support.smartbear.com/message/?prod=TestComplete) and ask for the web module license.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: