Module: Marta::Json2Class
Overview
Here Marta is reading json files and precreating pageobject classes which were defined previously
Main trick of the Marta is parsing jsons files to classes. For example valid Foo.json file in a valid folder will turn into Foo class. Class content differs when Marta is set to learning mode and when it’s not. Class will have methods = watir elements and vars = user defined vars with default values. Class will not accept any arguments for generated methods. The class will have default initialize method, engine method.
Also the class can has method_edit method. In theory it can be called like Foo.method_edit(‘new_method_name’). It should define new method even if learn mode is disabled. But I am never using such construction :) In learn mode any unknown method will cause dialog that will ask user about what element should be used.
Also for each method foo method foo_exact will be created and vice versa. Method wich ends with exact will use strict element searching scheme.
Defined Under Namespace
Classes: SmartPageCreator