My CheckProperty with cmpEqual always return an error when it checks 2 identical texts
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My CheckProperty with cmpEqual always return an error when it checks 2 identical texts
Hi
My aqObject.CheckProperty always fails. However, the text is strictly the same.
I tried with cmpEqual :
aqObject.CheckProperty(Aliases.browser.page1000508080FinvestQa31Startse.panelLeftcontainer.panelRiskClassGauge.panelGauge.panelContainer.panelHighcharts0, "contentText", cmpEqual, "Created with Highcharts 4.1.4↴IR7↴Classe de↴risque 2↴Classe de risque 2↴Classe de↴risque 3↴Classe de risque 3↴Classe de↴risque 4↴Classe de risque 4");
and with cmpMatches :
aqObject.CheckProperty(Aliases.browser.page1000508080FinvestQa31Startse.panelLeftcontainer.panelRiskClassGauge.panelGauge.panelContainer.panelHighcharts0, "contentText", cmpMatches, "Created with Highcharts 4.1.4↴IR7↴Classe de↴risque 2↴Classe de risque 2↴Classe de↴risque 3↴Classe de risque 3↴Classe de↴risque 4↴Classe de risque 4");
I tried to add
aqEnvironment.LanguageForNonUnicodePrograms = "French";
at the beginning of my function, but it doesn't help.
Do you have any idea?
Sylvain
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Being a web page, my guess is that there is a zero width character in the on screen text (often used for formatting). Can you try comparing the two strings with a better diff tool? https://text-compare.com might help.
Thanks,
Carson
Click the Accept as Solution button if my answer has helped
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you copy the text directly from your website, and your expected text into a text file and upload them?
Thanks,
Carson
Click the Accept as Solution button if my answer has helped
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that the characters you have in your code that show up as
↴
are how TestComplete represents those non-printing characters. They may be more accurately represented by a /n or something like that. As @cunderw suggests, that may be where the problem is.
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
Thank you for your messages.
The solution was to replace special characters with \n.
Best,
