Ask a Question

Property checkpoints (beginner question)

SOLVED
HarryJ
New Contributor

Property checkpoints (beginner question)

Hi everyone im brand new to test complete and i currently just going through beginner videos

 

To start with i was trying to test this budget application i made with javascript

pic1.PNG

Its just a simple app where you can input your income and expenses and keep track of an overall budget

What im trying to test is when the user inputs for example a 'Salary' of a grand the overall budget increases to a grand

e.g.

pic 2.PNG

So what im trying to test is when i input a thousand it goes to 1 thousand

 

So i made a new test and recorded

  • Clicking the textbox
  • Typing '1000'
  • And clicking the check button

 

After i did that i added a new property checkpoint

pic4.png

pic5.png

 

So i made it so the test checks it equals '+ 1,000.00'

 

However on running the test it fails

pic6.PNG

 

I cant seem to figure out why they dont match looking at the html its just a standard element

HarryJ_0-1625581522208.png

 

How do i get it so it checks that the exact value is '+ 1,000.00'

 

Any help would be appreciated thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Larry_M
New Contributor

Re: Property checkpoints (beginner question)

Hello @HarryJ ,

You might consider using the OCR checkpoint. It is available via a button at the top of the second page of the Checkpoint Wizard. TestComplete will make an image of the control and visually extract the text from the image. It is very accurate and powerful. 

Good Luck!

Larry

 

View solution in original post

5 REPLIES 5
Marsha_R
Community Hero

Re: Property checkpoints (beginner question)

I would guess that when the test runs, it's getting to that line before the object is actually there to check.

 

Just to test that theory, put a Delay of several seconds before the line that fails

https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/misc/delay.html

 

Let us know either way.  If the Delay fixes it, there's a better practice for doing that, using Wait, but I don't want to pile on solutions if that's not the problem.  Delay is just a quick way to check.

 

Welcome to TestComplete!

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
HarryJ
New Contributor

Re: Property checkpoints (beginner question)

The delay doesnt seem to change anything im afraid

Marsha_R
Community Hero

Re: Property checkpoints (beginner question)

Marsha_R_0-1625592693077.png

 

Okay, what you can see in here is that the Actual value is showing the control characters around the value you want and not just your value.  

 

There are a couple of things to try.  Look at the checkpoint again and see if you can drill down farther than the panel and get a property that's just your value without the extra characters.  If not, then we can look at using aqString to take that actual value apart and just find the bit that you need.

 

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
Larry_M
New Contributor

Re: Property checkpoints (beginner question)

Hello @HarryJ ,

You might consider using the OCR checkpoint. It is available via a button at the top of the second page of the Checkpoint Wizard. TestComplete will make an image of the control and visually extract the text from the image. It is very accurate and powerful. 

Good Luck!

Larry

 

View solution in original post

HarryJ
New Contributor

Re: Property checkpoints (beginner question)

That worked wonders Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: