Code Editor

Code editor is used to write custom code for steps which cannot be automated.


To create Code Editor DLL –

  1. In Visual Studio, create new project with output type as Class Library using dot net framework 4.6.
  2. Add SE.Core.Automation.Interfaces DLL and SE.Core.Automation.Models DLL references in the project.
  3. Implement ICodeEditor using SE.Core.Automation.Interfaces.Common.

  4. On implementation of ICodeEditor, PerformAction method and Execution completed event are fetched.
  5. In perform action, IApplicationAutomation contains the instance of plugin on which a user can perform the required automation.
  6. In extractedfields, a dictionary of input and output arguments is fetched that are in scope of flow chart from which data is extracted as well as set back to dictionary for further processing.
  7. After code editor operations are completed, raise the execution completed event.

    In case of Web Applications for Firefox and chrome, ApplicationType is Selenium and for Internet explorer, ApplicationType is WatIn
     

    NOTE:  

    To typecast IApplicationAutomation instance into specific application plugin add reference of Plugin from $RootFolder\SE\Plugins\ApplicationType\*.dll

  8. To access IE instance in code editor from the Web IE plugin, follow the below mentioned steps:
    Typecast IAppicationAutomation into IEPlugin.
    Call the method InternetExplorerObject of IEPlugin which returns the instance of IE.
    Refer to the code snippet below: