public Firefox(AutomationElement automationElement, WindowFactory windowFactory, InitializeOption option, WindowSession windowSession) : base(automationElement, windowFactory, option, windowSession) { }
/// <summary> /// Looks at all the windows visible for the application and finds one which matches the condition. The match is run against the title /// of the windows /// </summary> /// <param name="match"></param> /// <param name="initializeOption">option for the window which matches the condition</param> /// <exception cref="UIItemSearchException">The application type is not supported by White</exception> public virtual Window Find(Predicate <string> match, InitializeOption initializeOption) { WindowSession windowSession = applicationSession.WindowSession(initializeOption); return(windowFactory.FindWindow(process, match, initializeOption, windowSession)); }
private CachedContainerItemFactory CreateCacheFactory(InitializeOption option) { return(new CachedContainerItemFactory(CachedUIItems.CreateAndCachePrimaryChildControls(automationElement, option), actionListener)); }
private static string FileLocation(InitializeOption initializeOption) { return(string.Format(@"{0}\{1}.xml", CoreAppXmlConfiguration.Instance.WorkSessionLocation, initializeOption.Identifier)); }
/// <summary> /// Get visible window /// </summary> /// <param name="title">Title text of window displayed on desktop</param> /// <param name="option">Option which would be used to initialize the window.</param> /// <returns></returns> /// <exception cref="UIItemSearchException">The application type is not supported by White</exception> public virtual Window GetWindow(string title, InitializeOption option) { WindowSession windowSession = applicationSession.WindowSession(option); return(windowFactory.CreateWindow(title, process, option, windowSession)); }
protected Window(AutomationElement automationElement, InitializeOption initializeOption, WindowSession windowSession) : base(automationElement, new NullActionListener(), initializeOption, windowSession) { InitializeWindow(); }
public virtual T Get <T>(string title, InitializeOption option) where T : AppScreen { Func <Window> window = () => applicationSession.Application.GetWindow(title, IdentifiedOption <T>(option)); return(Get <T>(title, window)); }
/// <summary> /// Applicable only if CacheMode is used. This is for internal purpose of white and should not be used, as caching by itself is not supported /// </summary> /// <param name="option"></param> public virtual void ReInitialize(InitializeOption option) { currentContainerItemFactory.ReInitialize(option); }
public virtual Window Create(AutomationElement automationElement, InitializeOption initializeOption, WindowSession session) { return(new InternetExplorerWindow(automationElement, WindowFactory.Desktop, initializeOption, session)); }
public override Window ModalWindow(string title, InitializeOption option) { var childWindow = Get <Window>(SearchCriteria.ByText(title)); return(childWindow); }
public override Window ModalWindow(SearchCriteria searchCriteria, InitializeOption option) { var childWindow = Get <Window>(searchCriteria); return(childWindow); }
public override WindowSession WindowSession(InitializeOption initializeOption) { return(new NullWindowSession()); }
public override WindowSession ModalWindowSession(InitializeOption modalInitializeOption) { return(new NullWindowSession()); }
public override Window ModalWindow(SearchCriteria searchCriteria, InitializeOption option) { WindowFactory desktopWindowsFactory = WindowFactory.Desktop; return(desktopWindowsFactory.FindModalWindow(searchCriteria, option, automationElement, WindowSession.ModalWindowSession(option))); }
public BrowserWindow(AutomationElement automationElement, WindowFactory windowFactory, InitializeOption option, WindowSession windowSession) : base(automationElement, windowFactory, option, windowSession) { }
public Win32Window(AutomationElement automationElement, WindowFactory windowFactory, InitializeOption option, WindowSession windowSession) : base(automationElement, option, windowSession) { this.windowFactory = windowFactory; }
/// <summary> /// Get the modal window launched by this window. /// </summary> /// <param name="searchCriteria">Search Criteria to use to find a window</param> /// <param name="option">Newly created window would be initialized using this option</param> /// <returns></returns> public abstract Window ModalWindow(SearchCriteria searchCriteria, InitializeOption option);
public override Window ModalWindow(string title, InitializeOption option) { return(windowFactory.FindModalWindow(title, Process.GetProcessById(automationElement.Current.ProcessId), option, automationElement, WindowSession.ModalWindowSession(option))); }
private static InitializeOption IdentifiedOption <T>(InitializeOption option) { return(option.AndIdentifiedBy(typeof(T).FullName)); }
public override Window ModalWindow(SearchCriteria searchCriteria, InitializeOption option) { return(windowFactory.ModalWindow(searchCriteria, option, WindowSession.ModalWindowSession(option))); }
public virtual T Get <T>(SearchCriteria searchCriteria, InitializeOption option) where T : AppScreen { Func <Window> window = () => applicationSession.Application.GetWindow(searchCriteria, IdentifiedOption <T>(option)); return(Get <T>(searchCriteria.ToString(), window)); }
public override Window ModalWindow(string title, InitializeOption option) { return(null); }
public static CachedUIItems CreateAndCachePrimaryChildControls(AutomationElement parent, InitializeOption option) { var cachedUIItems = new CachedUIItems(); cachedUIItems.FindAll(parent); cachedUIItems.list.Sort(new AutomationElementPositionComparer()); return(cachedUIItems); }
public override Window ModalWindow(SearchCriteria searchCriteria, InitializeOption option) { return(null); }
/// <summary> /// Find the first window which belongs to this application and satisfies the critera. /// </summary> /// <param name="searchCriteria"></param> /// <param name="initializeOption">found window would be initialized with this option</param> /// <returns></returns> /// <exception cref="UIItemSearchException">The application type is not supported by White</exception> public virtual Window GetWindow(SearchCriteria searchCriteria, InitializeOption initializeOption) { WindowSession windowSession = applicationSession.WindowSession(initializeOption); return(windowFactory.CreateWindow(searchCriteria, process, initializeOption, windowSession)); }
public override Window ModalWindow(string title, InitializeOption option) { throw new NotSupportedException(); }
public CurrentContainerItemFactory(PrimaryUIItemFactory primaryUIItemFactory, InitializeOption initializeOption, AutomationElement automationElement, ActionListener listener) { this.automationElement = automationElement; actionListener = listener; current = nonCachedContainerItemFactory = new NonCachedContainerItemFactory(primaryUIItemFactory, actionListener); if (initializeOption.Cached) { cachedContainerItemFactory = CreateCacheFactory(initializeOption); current = cachedContainerItemFactory; } }
public override Window ModalWindow(SearchCriteria searchCriteria, InitializeOption option) { throw new NotSupportedException(); }
public DummyWindow(AutomationElement automationElement, InitializeOption initializeOption, WindowSession windowSession) : base(automationElement, initializeOption, windowSession) { }
/// <summary> /// Get the modal window launched by this window. /// </summary> /// <param name="title">Title of the modal window</param> /// <param name="option">Newly created window would be initialized using this option</param> /// <returns></returns> public abstract Window ModalWindow(string title, InitializeOption option);
public virtual Window Create(AutomationElement automationElement, InitializeOption initializeOption, WindowSession session) { return new Firefox(automationElement, WindowFactory.Desktop, initializeOption, session); }
protected TestConfiguration(string program, string commandLineArguments) { this.program = program; this.commandLineArguments = commandLineArguments; windowInitializeOption = InitializeOption.NoCache; }