Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WaitForPageAction" /> class.
 /// </summary>
 /// <param name="pageMapper">The page mapper.</param>
 /// <param name="browser">The browser.</param>
 /// <param name="logger">The logger.</param>
 public WaitForPageAction(IPageMapper pageMapper, IBrowser browser, ILogger logger)
     : base(typeof(WaitForPageAction).Name)
 {
     this.pageMapper = pageMapper;
     this.browser    = browser;
     this.logger     = logger;
 }
Beispiel #2
0
        /// <summary>
        /// Initializes the browser.
        /// </summary>
        /// <param name="objectContainer">The object container.</param>
        /// <returns>The browser.</returns>
        public static IBrowser InitializeBrowser(IObjectContainer objectContainer)
        {
            var scenarioContext = objectContainer.Resolve <IContextManager>().ScenarioContext;

            bool reusingBrowser = true;

            if (!browserFactory.Configuration.ReuseBrowser || browser == null || browser.IsDisposed)
            {
                browser = browserFactory.GetBrowser();
                scenarioContext.Set(browser, "CurrentBrowser");
                reusingBrowser = false;
            }

            if (browserFactory.Configuration.EnsureCleanSession)
            {
                browser.ClearCookies();

                if (reusingBrowser)
                {
                    browser.ClearUrl();
                }
            }

            IPageMapper pageMapper = objectContainer.Resolve <IPageMapper>();

            if (pageMapper.MapCount == 0)
            {
                pageMapper.Initialize(browser.BasePageType);
            }

            return(browser);
        }
	    /// <summary>
	    /// Initializes a new instance of the <see cref="PageNavigationSteps" /> class.
	    /// </summary>
	    /// <param name="browser">The browser.</param>
	    /// <param name="pageMapper">The page mapper.</param>
	    /// <param name="scenarioContext">The scenario context.</param>
	    /// <param name="actionPipelineService">The action pipeline service.</param>
	    public PageNavigationSteps(IBrowser browser, IPageMapper pageMapper, IScenarioContextHelper scenarioContext, IActionPipelineService actionPipelineService)
            : base(scenarioContext)
		{
			this.browser = browser;
			this.pageMapper = pageMapper;
			this.actionPipelineService = actionPipelineService;
		}
Beispiel #4
0
 public Migrator(ContentReference root, IPageMapper mapper)
 {
     _repo   = ServiceLocator.Current.GetInstance <IContentRepository>();
     _mapper = mapper;
     _currentConvertablePageData = new SourcePage();
     _root = root;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PageNavigationAction" /> class.
 /// </summary>
 /// <param name="browser">The browser.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="pageMapper">The page mapper.</param>
 public PageNavigationAction(IBrowser browser, ILogger logger, IPageMapper pageMapper)
     : base(typeof(PageNavigationAction).Name)
 {
     this.browser    = browser;
     this.logger     = logger;
     this.pageMapper = pageMapper;
 }
Beispiel #6
0
        //private readonly IRepository repository;

        public ExecuteHandler(
            HandlerFinder handlerTypes,
            IFactory factory,
            IPageMapper mapper)
        {
            this.handlerTypes = handlerTypes;
            this.factory      = factory;
            this.mapper       = mapper;
        }
Beispiel #7
0
 public MessageBus(
     HandlerFinder handlerTypes,
     IFactory factory,
     IPageMapper mapper
     )
 {
     this.handlerTypes = handlerTypes;
     this.factory      = factory;
     this.mapper       = mapper;
 }
Beispiel #8
0
        //private readonly IRepository repository;

        public MessageBus(
            HandlerFinder handlerTypes,
            IFactory factory,
            IPageMapper mapper
            //IRepository repository,
            //IClaimsProvider authenticator
            )
        {
            this.handlerTypes = handlerTypes;
            this.factory      = factory;
            this.mapper       = mapper;
            //this.authenticator = authenticator;
        }
Beispiel #9
0
 public AsyncCallHandler(IExecuteHandler executeHandler, IPageMapper mapper)
 {
     this.executeHandler = executeHandler;
     this.mapper         = mapper;
 }
Beispiel #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetCookiePreAction" /> class.
 /// </summary>
 /// <param name="browser">The browser.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="pageMapper">The page mapper.</param>
 public SetCookiePreAction(IBrowser browser, ILogger logger, IPageMapper pageMapper)
 {
     this.browser = browser;
     this.logger = logger;
     this.pageMapper = pageMapper;
 }
 public FormHandler(IExecuteHandler executeHandler, IPageMapper mapper)
 {
     this.executeHandler = executeHandler;
     this.mapper         = mapper;
 }
Beispiel #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetCookiePreAction" /> class.
 /// </summary>
 /// <param name="browser">The browser.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="pageMapper">The page mapper.</param>
 public SetCookiePreAction(IBrowser browser, ILogger logger, IPageMapper pageMapper)
 {
     this.browser    = browser;
     this.logger     = logger;
     this.pageMapper = pageMapper;
 }