Exemplo n.º 1
0
        public AddAssembly()
        {
            this.Location = new System.Drawing.Point(450, 350);
            InitializeComponent();
            this.TopMost = true;

            //Used to access StandardAddInServer's exposed API
            try
            {
                mApplication = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application") as Inventor.Application;
            }

            catch
            {
                Type inventorAppType = System.Type.GetTypeFromProgID("Inventor.Application");
                mApplication = System.Activator.CreateInstance(inventorAppType) as Inventor.Application;
            }
            mApplication.Visible = true;


            //Iterates through Inventor Add-Ins collection
            foreach (ApplicationAddIn oAddIn in mApplication.ApplicationAddIns)
            {
                //Looks for StandardAddInServer's Class ID;
                if (oAddIn.ClassIdString == "{E50BE244-9F7B-4B94-8F87-8224FABA8CA1}")
                {
                    //Calls Automation property
                    mAddInInterface = (AutomationInterface)oAddIn.Automation;
                }
            }
        }
 public TestModuleBase()
 {
     driver           = SetWebDriver(browser);
     wrapperFunctions = new SeleniumToolImpl(driver);
     baseDir          = AppDomain.CurrentDomain.BaseDirectory;
     utils            = new CommonUtils();
 }