Highlighted
Absent Member.
Absent Member.
985 views

Beginner : checkpoints won't work

Jump to solution

Hi everybody,

First of all sorry if this post is a duplicate of something else, but the search engine here is just awful since you cannot navigate solely in the current section, it always search in the hole forum...

Now regarding my problem : here is a written example of checkpoint script that doesn't  work :

Status = (Browser("PageExample").Page("PageExample").GetROProperty("URL").Check CheckPoint("The URL I want to be on"))
If Status Then
    print"checkpoint passed"
else
    print"checkpoint failed : wrong URL. Current URL is :"
    print Browser("PageExample").Page("PageExample").GetROProperty("URL")
End If

 

When I save this example, if tells me that I miss end of statement right before the keyword Checkpoint on the first line... Any idea why ?

 Finally, I'm having a hard time finding answers on the web : I've been trying to use HP UFT for 2 days now and I am kinda disappointed, for two reasons : 

  - most relevant topics on the web dates back to version 11.5, and many things changed in version 14 (i'm still searching for the active screen...)

  - most basic features are unexplained and don't work as depicted on the manual, therefore I have no idea what I am doing wrong or what should I do to solve my problem...

 so if you have any reliable sources for me to learn of, please tell me.

 

Thanks for your time

0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner
Knowledge Partner

You need to use a GetROProperty or a Checkpoint on an object not combine both, you can insert a checkpoint on the page to verify the URL or you can extract the URL using GetROProperty and when compare against expected.

If you record a checkpoint againts the page object you should see something like:

Browser("PageExample").Page("PageExample").Check CheckPoint("The URL I want to be on")

You can then verify if it matches the expected like this:

If (Browser("PageExample").Page("PageExample").Check CheckPoint("The URL I want to be on")) Then

       Do True process

Else

    Do false process

End If

Or you can capture the URL like this

expectedURL = "www.google.com"

actualURL = Browser("PageExample").Page("PageExample").GetROProperty("URL")

The check it against the expected as follows:

If expectedURL = actualURL

You might have to use a StrComp to check

 

Mark Smith.

 

 

View solution in original post

0 Likes
6 Replies
Highlighted
Knowledge Partner
Knowledge Partner

You need to use a GetROProperty or a Checkpoint on an object not combine both, you can insert a checkpoint on the page to verify the URL or you can extract the URL using GetROProperty and when compare against expected.

If you record a checkpoint againts the page object you should see something like:

Browser("PageExample").Page("PageExample").Check CheckPoint("The URL I want to be on")

You can then verify if it matches the expected like this:

If (Browser("PageExample").Page("PageExample").Check CheckPoint("The URL I want to be on")) Then

       Do True process

Else

    Do false process

End If

Or you can capture the URL like this

expectedURL = "www.google.com"

actualURL = Browser("PageExample").Page("PageExample").GetROProperty("URL")

The check it against the expected as follows:

If expectedURL = actualURL

You might have to use a StrComp to check

 

Mark Smith.

 

 

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks a lot Mark !!

But that make me realize I understood strictly nothing to the CheckPoint Statement, would you have some more infos about it please ?

 

You or anyone aware of course 😉

Tags (1)
0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

For information related to UFT and the functionality the tool provides, I advice you to check out the HPE UFT Help Center. If you would like to know more about checkpoints in UFT, see this chapter: Checkpoints in GUI Testing.

However, as Mark also mentioned as a solution, I have never used checkpoints as my primary solution for verifications. I have always conducted the verifications programmatically through different global methods which is then called throughout my tests.

From a personal experience, working with checkpoints are both time consuming and requires a lot of maintenance.

Good luck learning UFT!

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

I agree OM_H, I do not use checkpoints but I do not suggest someone learning UFT should not be aware of their availability.

I think most of us in the past have used checkpoints then as our UFT expertise has increased we realise that there are more robust or flexible ways to achieve the same without using inbuilt UFT checkpoints.

Mark Smith.

0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks again to both of you,

I also came to think that checkpoints aren't really effective (the number of time the selection tool rejected my checkpoint request because the selected object was unvalid is simply disgusting...)

The reason why I wanted to use those is because I won't be the final user of hp UFT, it shall be used by my colleagues who are "functionnals", which here means they do not know how to code, therefore I cannot rely on script writing, I need a way to let them check different things without having to right a single line of script...

 

Therefore, I came to start a function library, which will contains all the different functions they might need a day or another. 

 

For those who are struggling like me to discover this tool, you might want to check this website :  https://www.tutorialspoint.com/qtp/index.htm

It is impressively useful and rich, eventhough the english quality is really bad sometimes... Hope this will help !

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

> the search engine here is just awful since you cannot navigate solely in the current section, it always search in the whole forum

 

If you use the Search box at top, you can select Category or Board to restrict it.

/t5/Community-FAQ/FAQ-Community-Search/td-p/6838090

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.