Inheritance: IBrowserFacade
 public void Setup()
 {
     _request = new Request()
     {
         Url = "http://www.google.com/",
         Browser = "phantomjs"
     };
     _facade = new PhantomJsFacade(_request);
 }
示例#2
0
        public static IBrowserFacade CreateFacade(IWebDriver webDriver, Request request)
        {
            IBrowserFacade facade;

            if (request.Browser == null || request.Browser.ToLower() != "phantomjs")
            {
                facade = new WebDriverFacade(webDriver, request);
            }
            else
            {
                facade = new PhantomJsFacade(request);
            }

            return facade;
        }
示例#3
0
        public static IBrowserFacade CreateFacade(Request request)
        {
            IBrowserFacade facade;

            if (request.Browser == null || request.Browser.ToLower() != "phantomjs")
            {
                var config = GetConfig(request);
                var web = GetWebDriver(config);
                facade = new WebDriverFacade(web, request);
            }
            else
            {
                facade = new PhantomJsFacade(request);
            }

            return facade;
        }