Exemplo n.º 1
0
        public virtual ITestObjectMap GetObjectMap()
        {
            if (_objMap == null)
            {
                ITestObjectPool pool = GetObjectPool();
                pool.SetTestPage(this);
                _objMap = new TestObjectMap(pool);
            }

            return(_objMap);
        }
Exemplo n.º 2
0
        /* void LoadPlugin()
         * Get the dll we need.
         * use reflecting to load dll at runtime.
         */
        private void LoadPlugin()
        {
            _objPool = TestFactory.CreateTestObjectPool();

            if (TestFactory.AppType == TestAppType.Desktop)
            {
                _testApp = TestFactory.CreateTestApp();
                _objPool.SetTestWindow(_testApp.CurrentWindow);
            }
            else if (TestFactory.AppType == TestAppType.Web)
            {
                _testBrowser = TestFactory.CreateTestBrowser();
                _objPool.SetTestPage(_testBrowser.CurrentPage);
            }
            else
            {
                throw new CannotInitCoreEngineException("Unknow application type.");
            }
        }
Exemplo n.º 3
0
 /*  ITestObjectPool CreateTestObjectPool()
  *  return the interface of ITestObjectPool.
  *  This interface is used to find the test object.
  */
 public static ITestObjectPool CreateTestObjectPool()
 {
     if (String.IsNullOrEmpty(_testObjPoolDLL))
     {
         throw new CannotLoadDllException("Test object dll can not be null.");
     }
     try
     {
         _objPool = (ITestObjectPool)LoadDll(_testObjPoolDLL, _testObjectPoolClassName);
     }
     catch (Exception ex)
     {
         throw new CannotLoadDllException("Can not create instance of test object pool: " + ex.ToString());
     }
     if (_objPool == null)
     {
         throw new CannotLoadDllException("Can not create instance of test object pool.");
     }
     else
     {
         return(_objPool);
     }
 }
Exemplo n.º 4
0
 /*  ITestObjectPool CreateTestObjectPool()
  *  return the interface of ITestObjectPool.
  *  This interface is used to find the test object.
  */
 public static ITestObjectPool CreateTestObjectPool()
 {
     if (String.IsNullOrEmpty(_testObjPoolDLL))
     {
         throw new CannotLoadDllException("Test object dll can not be null.");
     }
     try
     {
         _objPool = (ITestObjectPool)LoadDll(_testObjPoolDLL, _testObjectPoolClassName);
     }
     catch (Exception ex)
     {
         throw new CannotLoadDllException("Can not create instance of test object pool: " + ex.ToString());
     }
     if (_objPool == null)
     {
         throw new CannotLoadDllException("Can not create instance of test object pool.");
     }
     else
     {
         return _objPool;
     }
 }
Exemplo n.º 5
0
 public TestObjectMap(ITestObjectPool pool)
 {
     this._objPool = pool;
 }
Exemplo n.º 6
0
 public virtual void SetTestObjectPool(ITestObjectPool pool)
 {
     this._objPool = pool;
 }
Exemplo n.º 7
0
 public TestObjectMap(ITestObjectPool pool)
 {
     this._objPool = pool;
 }
Exemplo n.º 8
0
 public virtual void SetTestObjectPool(ITestObjectPool pool)
 {
     this._objPool = pool;
 }