cancel
Showing results for 
Search instead for 
Did you mean: 

Use TestComplete to verify all of the fields in a chart are filled (Keyword solution preferred).

Highlighted
Contributor

Use TestComplete to verify all of the fields in a chart are filled (Keyword solution preferred).

I've been asked if there is a way to use TestComplete to scan our entire product inventory to verify that there are no empty fields on any of the charts on our Product Detail Pages on our website.  Not verify the content itself, just make sure something is there - so no blank fields.  An example of a chart for us looks like this:

 

RichBopp_0-1605815842710.png

Where I think we would really run into an issue is that charts are specific to the product, so they all look different - i.e. 

RichBopp_1-1605815943725.png

Any ideas?  

 

2 REPLIES 2
Highlighted
Community Hero

Re: Use TestComplete to verify all of the fields in a chart are filled (Keyword solution preferred).

Hi,

 

There is no generic solution, but you might appear to be more or less lucky depending on how testable your tested application is.

For example, assuming that all tested fields are children of a chart table and have 'fld' as a prefix for their ids (e.g. fldModelNo, fldSize, ...), then you will be able to find all of them, iterate through and check if the given field is empty or not.

E.g.:

var arFields = <chartTable>.FindAllChildren('id', 'fld*', 5).toArray();

for (var i = 0; i < arFields.length; i++)

  if (arFields[i].Value == '')

    Log.Warning(...);

 

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

Re: Use TestComplete to verify all of the fields in a chart are filled (Keyword solution preferred).

Alex - Thank you for responding, and sorry for the late reply.  Work followed by a bit of time off.

 

I will review the solution you provided later this week, and let you know how it goes.

 

Again, Thanks.

 

Rich

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors