Forum Discussion

HarryJ's avatar
HarryJ
Occasional Contributor
4 years ago

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

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.

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

 

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

 

However on running the test it fails

 

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

 

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

 

Any help would be appreciated thank you

  • 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

     

  • Larry_M's avatar
    Larry_M
    New Contributor

    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

     

    • HarryJ's avatar
      HarryJ
      Occasional Contributor

      That worked wonders Thanks!

  • 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!

    • HarryJ's avatar
      HarryJ
      Occasional Contributor

      The delay doesnt seem to change anything im afraid

      • Marsha_R's avatar
        Marsha_R
        Moderator

         

        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.