public Navigator(INavigationMap mapView, Route route, IGeolocator geoLocator, NavigationStats navigationStats) { _mapView = mapView; _route = route; _geoLocator = geoLocator; _navigationStats = navigationStats; }
private Navigator(IWebDriver driver, INavigationMap map) { var rwd = driver as RemoteDriver; this.SessionId = rwd == null?Guid.NewGuid().ToString() : rwd.GetSessionId(); Navigator.driver = new EventFiringWebDriver(driver); this.navigationMap = map; this.SubscribeToEvents(); }
public static void Setup(INavigationMap map) { try { map.Initialize(TestEnvironment.Current.WebsiteUrl); var parameters = new NavigatorSessionParameters { NavigationMap = map, AcceptUntrustedCertificates = TestEnvironment.Current.AcceptUntrustedCertificates, WebDriverType = TestEnvironment.Current.WebDriverType, HideCommandPromptWindow = TestEnvironment.Current.HideCommandPromptWindow, ImplicitlyWait = TestEnvironment.Current.ImplicitlyWait, PageLoadTimeout = TestEnvironment.Current.PageLoadTimeout, ScriptTimeout = TestEnvironment.Current.ScriptTimeout, RunUsingSauceLabs = TestEnvironment.Current.RunUsingSauceLabs, SauceLabsRemoteBrowser = TestEnvironment.Current.SauceLabsRemoteBrowser, SauceLabsRemoteBrowserVersion = TestEnvironment.Current.SauceLabsRemoteBrowserVersion, SauceLabsRemotePlatform = TestEnvironment.Current.SauceLabsRemotePlatform, SauceLabsRemoteDriverUrl = TestEnvironment.Current.SauceLabsRemoteUrl, SauceLabsRemoteUsername = TestEnvironment.Current.SauceLabsRemoteUsername, SauceLabsRemoteKey = TestEnvironment.Current.SauceLabsRemoteKey }; Navigator.Initialize(parameters); } catch (Exception ex) { var sb = new StringBuilder(); sb.AppendLine("[Error] BrowserSetup"); sb.AppendLine("Exception:"); sb.AppendLine(" "); sb.AppendLine(ex.ToString()); sb.AppendLine("Parameters:"); sb.AppendLine(TestEnvironment.Current.Description); throw new ApplicationException(sb.ToString()); } }
public NavigatorMockSpy(INavigationMap mapView, Database.Model.Route route, IGeolocator geoLocator, NavigationStats navigationStats) : base(mapView, route, geoLocator, navigationStats) { }