Command to check for any unexpected elements (e.g. filters, columns or similar) in the screen?

Hello,
I am new to Katalon.

Was wondering which command I could use to check for any unexpected elements (e.g. filters, columns or similar) ?

I have used “Verify Element Present” and “Verify Element Text” to check for the known filters and columns, but not sure how I would go about flagging the unexpected elements i.e. elements not explicitly defined, or in other words a scenario where a developer introduced a new filter or column by mistake ?

Thank you kindly in advance.
Nick

I don’t believe there is a “catch all” method for the scenario you describe. You would probably need to Verify a series of items or Wait for a series of items and then process from there. I believe you would have to check for certain types of issues that might come up, and use a small timeout value so it doesn’t hang for minutes on end waiting for something that might not appear.

Caveat: I have not tried this!

Someone recently mentioned this tool: https://www.imagemagick.org/script/compare.php

I imagine you could kick off a command (shell script etc) to run the tool against screenshots and flag any that differ beyond a given threshold?

Any idea if this could be done using Decision-making statements?

Something like:
IF the filter name (td_) not in (FilterName1, FilterName2, FilterName3), THEN raise a flag.
IF the column name (span_
) not in (ColumnName1, ColumnName2, ColumnName3) THEN raise a flag

, is that possible?

Not sure how I would go about writing this in Manual/Script mode though …

Thanks.
Regards,
Nick

Any idea if this could be done using Decision-making statements?

Something like:
IF the filter name (td_) not in (FilterName1, FilterName2, FilterName3), THEN raise a flag.
IF the column name (span_
) not in (ColumnName1, ColumnName2, ColumnName3) THEN raise a flag

, is that possible?

With the wealth of Java libs available to Katalon Studio, almost anything is possible.

Not sure how I would go about writing this in Manual/Script mode though …

Exactly. As ever, the amount of work involved has to be measured against the perceived benefit of the approach and outcome.

It’s certainly interesting… just not needed enough (is my opinion).

In theory something like that could be done. You could read the filters and column names, then do a compare against something predetermined. It depends on how the page is laid out to determine what you need to use. The error could be the Throw command or the LogError.

An object that uses are a variable as part of the XPATH could be used.

As Russ said, there is a lot of “could”, but it depends on the amount of time needed and how easy it is access to access the information you need.