Ask a Question

POM for keyword test on TestComplete

SOLVED
RadGuru
Occasional Contributor

POM for keyword test on TestComplete

Hello,

Is there any example (or documentation) of POM structure for Keyword test on TestComplete for desktop applications?

6 REPLIES 6
rraghvani
Trusted Contributor

What do you mean by POM structure? 

RadGuru
Occasional Contributor

Page Object Model

rraghvani
Trusted Contributor

From what I've just read about POM, it seems like it's similar to Name Mapping, a repository that stores all the objects of your tested applications.

fredsmith
New Contributor

Keyword tests by their very nature aren't Object Orientated so it's a little difficult to implement the Page Object Model. However, an approach is detailed here...

 

https://www.testmanagement.com/blog/2023/02/building-a-framework-with-testcomplete/

 

It has limitations! Ultimately you'll probably want to move towards an object orientated coded approach (either JavaScript or Python), but this might help.

tristaanogre
Esteemed Contributor

This is correct.  POM is about setting up a model of the objects that you're going to automate against and then build methods and properties on those objects.  It's not necessary to build a POM in TestComplete because NameMapping essentially builds most of that for you.  If you want to build custom functions to operate against particular objects, that's possible but it's not exactly POM because you can't just call Aliases.MyPage.MyControl.MyCustomFunction.  Instead, you'd have to do something like MyCustomFunctions(Aliases.MyPage.MyControl,"MyAction") to execute a custom action against a control.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
AlexKaras
Community Hero

Hi,

 

Just a minor note to what was suggested by @tristaanogre and @rraghvani : you should use not NameMapping, but Aliases which is a higher abstraction built over NameMapping.

 

Regards,
  /Alex [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
================================
cancel
Showing results for 
Search instead for 
Did you mean: