cancel
Showing results for 
Search instead for 
Did you mean: 

TestComplete property check failed even after match!!!

SOLVED
Highlighted
Contributor

TestComplete property check failed even after match!!!

see the attached file, even after both text match, it shows failure in aqObject property check............i am using 14.10, as 14.30 not supporting my product

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Hi @santi,

 

If "text contains" doesn't work for you, I could suggest that you consider creating a custom comparison based on regular expressions. You can easily divide the text into groups among non-printable characters and compare them. You can find more information on how to work with regular expressions in the following article:

https://support.smartbear.com/testcomplete/docs/scripting/regular-expressions.html

---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

12 REPLIES 12
Highlighted
Community Leader

Hey,

Can you show the script responsible for this piece of application?
Also, write where you download the text for verification.

Highlighted
Community Hero

Some of those non-printing characters are a pain to actually match. You might want to simply replace the non-printing with an asteristk.


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
Highlighted
Contributor

I can not share more code (apart from what i attached in png with original message) reason being it's production code in my company, restricted by terms and conditions. Its simple aqobject property check for a panel, where cmpEqual showing something diffrent even though i copied exact text what test complete read from the panel.

I am surprised how come Test Complete engine rejecting it even though both texts as same.

Highlighted
Contributor

Possibly that is the reason, can somebody from smartbear give some idea on this, incase they see these threads.

Highlighted
Community Leader

Hi,

 

is right. Replace special characters in a string with * and after that try to match these strings.
Highlighted
Contributor

Thanks for reply. I tried replacing with * , but same result (failure) i am experiencing.

Mismatched:

ConditionActual valueExpected value
equals (case-sensitive)
"Device name↴IP address↴Device model"
"Device name*IP address*Device model"
Highlighted
Community Leader

But you have to replace that arrow in both strings of signs. Y

 

ou cannot compare an arrow to an asterisk.

Highlighted
Contributor

Arrow is what system is identifying from UI object, below text is what i am hard coding (contentText) for text comparison. 

Highlighted
Community Hero

The thing is... it's not EXACTLY.  That's the thing... those arrows represent a non-printing character.  So, if you copied and pasted the ARROW, that's a mismatch.  What I've had to do in the past is go to Object Browser and grab what's there and use that rather than what shows up in the logs.


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
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors