Import Existing Page Objects
Import existing or custom coded page objects into TestModeller.io to utilise them for creating automated models.
The page object importer is a vital component for test automation with TestModeller. This is useful for two reasons. Firstly, it may be the case that you have an existing automation framework with page objects already defined. Secondly there may be instances where you need to embed some custom code into TestModeller.io to perform specific actions which are not directly available within TestModeller. TestModeller.io supports full synchronisation with page objects from code, that means you can keep editing code and resynchronising into TestModeler at any time. If your changes effects any your models we notify you of the impacted models which need updating.
The page object importer works on collections of code files. Therefore, you must first place the objects or framework files that you want to register into TestModeller.io into a ZIP file.
Open TestModeller.io and login to your account.
Optional – If you are hosting TestModeller.io on-premise or have your own automation server which you'd like to use for code generation we recommend linking your server to the current project. To do this you need to:
Go to projects in the sidebar.
Select the project you are currently working on.
Open the settings panel.
Select the automation server to link and click save.
Go to the models view.
Click the 'import' button and select to import 'Code Page Object'.
6. A dialogue box will appear. This is where you can specify the zip file with your code definitions to synchronise.
7. Once this is complete, navigate to the folder you selected to perform the import in and the associated modules will have been imported. Note: If you are importing an object that has already been registered in TestModeller.io it will be synchronised with the existing object and no new modules will be created.
Page object synchronisation
TestModeller.io features a full synchronisation engine for page objects. TestModeller.io will first attempt to do this using a GUID if one is defined in the class. You'll notice for page objects generated from TestModeller.io it does this by embedding the @TestModellerModuleId annotation at the top of the class with an associated GUID already defined. If there is no matching class for the GUID it will search for an object with the same path and name within the project. Otherwise, a new module is created and no synchronisation occurs.