I have some experience with using Selenium and Python to set up testing frameworks for web applications using the Page Object pattern. However, my current employer wishes to keep all of our tests within TestComplete. I was wondering if it's possible to use the Page Object Model with TestCompelete. I can think of the following two ways of going about this - but I'm unsure if they work in practice.
Create PageObjects inside of TestComplete in either Python or using
the Record/Play tool, and then write a series of test suites using
these Page Objects.
Create a Page Object Model framework outside of TestComplete using
Python and Selenium, and then import this into TestComplete, where I
would write a series of test suites using methods created via this
Any advice or stories on successfully/unsuccessfully implementing the Page Object Model in TestComplete would be appreciated too.
Yes, you can use the Page Object model with TestComplete. You can use Selenium, or you can learn how TestComplete's web object model works and use that instead. If you haven't already done so, I'd recommend reading SmartBear's documentation on the topic.
Some of the things you will need to consider:
To use Selenium, you would need to work out how to reference the Selenium .dll files and manually build the reference into your test projects. My experience with TestComplete and third-party .dll files is that it's a lot easier to work with TestComplete's built-in functionality
TestComplete's web control management is extremely easy to work with. I strongly recommend using it rather than Selenium, then using TestComplete's aliasing ability to define simple named aliases for the controls you are interacting with. That way, if something changes you don't need to make any code changes: just update your mapped alias.
I recommend using the Record/Play tool only to locate your objects and components.
A general TestComplete caveat: you will need to make sure you are not running your scripts headless. The tool requires an active GUI interface. The method I've seen used effectively is to use TestComplete's light-weight execution engine (TestExecute) to run on remote systems, and check progress by one or more of:
Setting up the remote system with a lightweight VNC server and connecting to it using a VNC client.
If the remote system is on a virtual machine server, using the VM client connection tools to check it.
Exporting test logs to a shared network location for checking.
Adding a scripted wrap up routine to collate and email script results at the end of a run.