cancel
Showing results for 
Search instead for 
Did you mean: 

How can I write custom checkpoints in script

SOLVED
forrestaustin
Contributor

How can I write custom checkpoints in script

Hello,

 

Is there a way to write more customizable checkpoint properties.

 

Instead of something like:

aqObject.CheckProperty(WPF_Control,"Text",cmpEqual,"Some Text") - This is simply what you would get by manually recording a test, verifying a control has some certain text and then converting this keyword test to a script.

 

I would like get a property from a control and perform some action on it, then create a new checkpoint based off this.

 

A contrived example would maybe be to get the value from a textfield and then see if it is divisible by 5. If it is then have a checkpoint that says it passed and if not have the checkpoint fail.

 

Does anyone know how to do this in TestComplete?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
forrestaustin
Contributor

Re: How can I write custom checkpoints in script

ok I'm dumb. It was as simple as Log.Checkpoint("Checkpoint message")

View solution in original post

2 REPLIES 2
forrestaustin
Contributor

Re: How can I write custom checkpoints in script

I see from this link that I could just do an if statement with a Log.message / Log.Error

https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/property/properties.html

 

This could possibly work, but I was hoping to keep the log more consisent with the other property checkpoints.

By that, I mean I would like the log to show it as a checkpoint with a green check next to it instead of just a message.

forrestaustin
Contributor

Re: How can I write custom checkpoints in script

ok I'm dumb. It was as simple as Log.Checkpoint("Checkpoint message")

View solution in original post

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