public BrowserProfileViewModel(IBrowserStateNotificationService browserStateNotificationService, IMediator mediator, BrowserProfile browserProfile) { _browserProfile = browserProfile; Browser = new BrowserViewModel(browserStateNotificationService, mediator, _browserProfile.Browser); Profile = new ProfileViewModel(browserStateNotificationService, mediator, _browserProfile.Profile); }
public async Task UseBrowserProfileAsync(BrowserProfile browserProfile, string requestUrl, bool saveRequestUrl) { if (saveRequestUrl) { var requestDomain = SelectionRule.GetPartFromUrl(SelectionRule.SelectionRuleParts.Domain, requestUrl); var command = new CreateProfileSelectionRuleCommand( browserProfile.Profile.Id, SelectionRule.SelectionRuleParts.Domain, SelectionRule.SelectionRuleCompareTypes.Equals, requestDomain); await _mediator.Send(command); } browserProfile.NavigateToUrl(requestUrl); await _mediator.Send(new ApplicationShutdownCommand()); }
public static IWebDriver GetDriver() { var browserProfile = new BrowserProfile(Settings.GetSettings()); return(CreateDriver(browserProfile)); }
private Task UseBrowserProfile(BrowserProfile browserProfile) { return(_browserService.UseBrowserProfileAsync(browserProfile, BrowserState.RequestUrl, BrowserState.SaveRequestUrl)); }