Search and repalce a specific operation on all KeywordTests
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2013
08:18 AM
12-16-2013
08:18 AM
Search and repalce a specific operation on all KeywordTests
We are just using the default TestComplete automatic namemapping during recording and so far we have no problems with it. Our application now has a newer branch, with a support for HTML formmatting on the same spot where the normal textcontrol is - buttom line, it's a new object. I have edited namemapping mapped object to do conditional mode, to support both the old textcontrol and the HTML capable textcontrol and I am happy that it works.
However, the problem now is that most KeywordTests uses the operation SetText() and the newer object doesn't have SetText() but just set_text(). The old object supports both SetText() and set_text() - so it was a poor decision of not using set_text() - well we haven't known that till now.
Is there a way to do a search and replace functionality for all KeywordTests in the project to change all instances of SetText() to set_text() ?
However, the problem now is that most KeywordTests uses the operation SetText() and the newer object doesn't have SetText() but just set_text(). The old object supports both SetText() and set_text() - so it was a poor decision of not using set_text() - well we haven't known that till now.
Is there a way to do a search and replace functionality for all KeywordTests in the project to change all instances of SetText() to set_text() ?
Solved! Go to Solution.
10 REPLIES 10
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2013
06:43 PM
12-16-2013
06:43 PM
Hi Ivan,
The set_text method seems to be a custom method of the control while SetText is the one provided by TestComplete. You don't see the SetText action as the control may not have special support in TestComplete. However, it looks like this control is inherited from the one that is supported by the tool. So, you can try using the Object Mapping feature to make TestComplete treat the control as a supported control. In this case, SetText will be available for the controls, and there will be no need to modify the test.
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2013
09:24 AM
12-18-2013
09:24 AM
Hi Tanya. thank you for pointing that out.
I tried to add the Class using the "Add From Screen", it uses the WndClass value and playing it gave me this error:
Unable to find the object SetText("act"). See Additional Information for details.
The object with the specified attributes does not exist.
Possible causes of the error
I removed that class and added it manually as "TXTextControl.TextControl" (which is the value of ClrFullClassName
There's no error but TestComplete was not able to set the text on it. As I view it while in playback, it does nothing.
The control is documented here:
http://www.textcontrol.com/en_US/support/documentation/dotnet/n_textcontrol.htm
It looks like a richtextbox and it is intended to be an HTML editor, more like a richtextbox but for HTML editing. It also wrapped inside (its parent object) an Infragistics Ultrapanel (if that matters)
What can you advise?
I tried to add the Class using the "Add From Screen", it uses the WndClass value and playing it gave me this error:
Unable to find the object SetText("act"). See Additional Information for details.
The object with the specified attributes does not exist.
Possible causes of the error
I removed that class and added it manually as "TXTextControl.TextControl" (which is the value of ClrFullClassName
There's no error but TestComplete was not able to set the text on it. As I view it while in playback, it does nothing.
The control is documented here:
http://www.textcontrol.com/en_US/support/documentation/dotnet/n_textcontrol.htm
It looks like a richtextbox and it is intended to be an HTML editor, more like a richtextbox but for HTML editing. It also wrapped inside (its parent object) an Infragistics Ultrapanel (if that matters)
What can you advise?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2013
04:27 PM
12-18-2013
04:27 PM
Hi Ivan,
It looks like my suggestion won't work for this control. I suggest that you vote for it on this page - this way, implementing support for your control in one of the future updates will get a higher priority.
At the moment, using set_text seems to be the only option. So, you will have to modify the keyword test. I suggest that you do it outside TestComplete by changing the corresponding .tcKDTest file (TestComplete can search only though the Value column in the Keyword Editor, but you need to change the Operation column).
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2014
09:09 AM
08-08-2014
09:09 AM
Hi Tanya,
I have a follow up question on this--it sounds like you have already answered it, but I am hoping that you may have suggestions.
We have a project suite that is composed mostly of keyword tests.
If we need to change a keyword operation for an entirely different one, is there an efficient way to accomplish that?
Similary to Ivan's question, how could I find all Delay keyword operations in the project suite and replace them with Run Script Routine operations?
Any suggestions would be appreciated.
Thanks,
Daniel
I have a follow up question on this--it sounds like you have already answered it, but I am hoping that you may have suggestions.
We have a project suite that is composed mostly of keyword tests.
If we need to change a keyword operation for an entirely different one, is there an efficient way to accomplish that?
Similary to Ivan's question, how could I find all Delay keyword operations in the project suite and replace them with Run Script Routine operations?
Any suggestions would be appreciated.
Thanks,
Daniel
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2014
11:33 PM
08-27-2014
11:33 PM
Hi Daniel,
Right now, TestComplete can search through the Value column in keyword tests. As the Delay command is specified in the Operation column, TC won't find anything there. So, the only option is to modify the .tcKDTest file.
Right now, TestComplete can search through the Value column in keyword tests. As the Delay command is specified in the Operation column, TC won't find anything there. So, the only option is to modify the .tcKDTest file.
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2019
02:52 AM
01-30-2019
02:52 AM
Hey all,
@TanyaYatskovska , is there any update since than so i can search through the Operation column in keyword tests?
best regards
Kai
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019
02:18 AM
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019
05:58 AM
02-05-2019
05:58 AM
PLease submit a feature request if this is something you want to see. have you downloaded and tried TC 14 just to be sure?
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019
11:47 PM
02-05-2019
11:47 PM
Hi @tristaanogre ,
yes i tryed it with TC14. What i need to do to submit for a feature request?
regards
Kai
