cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get rid of this warning message?

SOLVED
whuang
Frequent Contributor

How can I get rid of this warning message?

Hi there,

 

I have a string to enter into a text field, and I know the string is too long and is going to be truncated, and that is what I want to test, but this triggers a warning message in TC "the text specified in the edit box has been truncated, since it was too long". Is there anyway I can get rid of the warning and make it not to be triggered?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: How can I get rid of this warning message?

Hi,

 

Use OnLogWarning event handler and block this exact message (maybe, for this exact test) from been posted to test log.

 

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

5 REPLIES 5
AlexKaras
Community Hero

Re: How can I get rid of this warning message?

Hi,

 

Use OnLogWarning event handler and block this exact message (maybe, for this exact test) from been posted to test log.

 

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

whuang
Frequent Contributor

Re: How can I get rid of this warning message?

Thanks for the suggestion. I know exactly where and when the warning will show up, so I was doing it in another way by using LogParams.Locked = True directly right before entering the string, but I was getting "Object required: 'LogParams'", do you see why I was getting it?

 

LogParams.Locked = True

Obj.SetText String

whuang
Frequent Contributor

Re: How can I get rid of this warning message?

Never mind, I sort it out

ebarbera
Staff

Re: How can I get rid of this warning message?

Hi @whuang - 

 

I believe you are receiving this message because TestComplete is not aware of which log object you are referring too. As Alex mentioned the best way to approach this would be to block that specific message, you can reference this post which explains how to do that: https://community.smartbear.com/t5/TestComplete-Functional-Web/Surpressing-warnings/td-p/77159

 

Emma

AlexKaras
Community Hero

Re: How can I get rid of this warning message?

Hi,

 

"Object required: 'LogParams'", do you see why I was getting it?

Because LogParams object is accessible from event handler code only.

 

In your case you may also consider Log.Enabled property.

 

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
================================
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors