Test if Text Field is Empty
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Test if Text Field is Empty
Hi,
We are trying to perform actions on a text field based on its content, particularly if it is empty.
At this point we have tried Checkpoints and Compare Properties with various options configured, and even if/then statements but none of these accept the parameter Field.wText equals "".
We have also tried using "undefined" and "null" and the simple quotes.
We are running out of ideas at this point as TestComplete simply states that whatever we put in is not an acceptable value.
Details about the field tested:
WndClass: WindowsForms10.RichEdit20W.app.0.ab933b_r6_ad1
ClrClassName: AYTRichTextBox
ClrFullClassName: Keyoti.RapidSpell.AYTRichTextBox
Same issue occurs on another text field with the following details:
WndClass: WindowsForms10.STATIC.app.0.ab933b_r6_ad1
ClrFullClassName: System.Windows.Forms.Label
Important information we are not using Script, only Keyword Tests.
Anyone has any idea how to verify that the text field has nothing in it?
Thanks,
Auriane
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's see the actual error that TestComplete is giving and also a screenshot of the object spy results for one of those fields.
Marsha_R
[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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@alesaux wrote:
We are running out of ideas at this point as TestComplete simply states that whatever we put in is not an acceptable value.
This is an interesting statement... Can you give a screenshot or screenshots of the steps you are going through to create the checkpoint or if-then logic? It sounds like you're entering something into a field that is not expected... like putting a code expression into a field for an onscreen object... or something like that.
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
Hi,
Thank you for your replies. So weirdly today we have not been able to reproduce the issue. We started from scratch since posting (created a new keyword test item, re-recorded and tested if the field is blank in multiple ways) and it now works as expected.
I think we must have done what you suggested and tried to compare incompatible object types? Not sure.
Will update this thread should this reoccur as we are having a lot of odd test results with our application due to the Object being partially unsupported (DotNetBar items and the lot).
Thanks!
