public string this[string attributeName] { get { ElementFound elementFound = Now(); return(elementFound[attributeName]); } }
internal FillInWith(ElementFound element, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options) { this.element = element; this.driver = driver; this.robustWrapper = robustWrapper; this.scope = scope; this.options = options; }
protected internal virtual ElementFound FindElement() { if (element == null || element.Stale(ElementFinder.Options)) { element = disambiguationStrategy.ResolveQuery(ElementFinder); } return(element); }
protected internal ElementFound FindElement() { if (element == null || element.Stale) { element = elementFinder.Find(); } return(element); }
public void StubCss(string cssSelector, Regex textPattern, ElementFound result, Scope scope) { if (result != null) { stubbedCssResults.Add(new ScopedStubResult { Locator = cssSelector, TextPattern = textPattern, Scope = scope, Result = result }); } }
internal FillIn(Driver driver, DriverScope scope, string locator, ElementFound element, string value, bool forceAllEvents, Options options) : base(driver,options) { this.locator = locator; this.element = element; this.scope = scope; this.value = value; this.forceAllEvents = forceAllEvents; }
internal FillIn(Driver driver, DriverScope scope, string locator, ElementFound element, string value, bool forceAllEvents, Options options) : base(driver, options) { this.locator = locator; this.element = element; this.scope = scope; this.value = value; this.forceAllEvents = forceAllEvents; }
public T GetElementByID(int ID) { T Element = ElementList.SingleOrDefault(ElementFound => (ID == ElementFound.GetID())); if (null != Element) { return((T)Element.Clone()); } else { return(default(T)); } }
public void FoundTime(int numberOfGames, ref List <Game> gameArr) { int time; EventHandler <Game> pr = Game.ShortInfo; Console.WriteLine("Enter how much time you are willing to spend on the game : "); time = ValidationInt(); Console.WriteLine("Games suitable for you: "); for (int i = 0; i < numberOfGames; i++) { if (gameArr[i].TimeSearch(time) == 1) { ElementFound?.Invoke(this, gameArr[i]); Console.WriteLine(""); } } }
public void FoundDoubleReating(int numberOfGames, ref List <Game> gameArr) { float reatingFirst, reatingSecond; EventHandler <Game> pr = Game.ShortInfo; Console.WriteLine("Enter the minimum player rating: "); reatingFirst = Validationfloat(); Console.WriteLine("Enter the minimum press rating: "); reatingSecond = Validationfloat(); Console.WriteLine("Games suitable for you: "); for (int i = 0; i < numberOfGames; i++) { if (gameArr[i].DoubleReatingSearch(reatingFirst, reatingSecond) == 1) { ElementFound?.Invoke(this, gameArr[i]); Console.WriteLine(""); } } }
public void FoundAgeReating(int numberOfGames, ref List <Game> gameArr) { float reatingFirst; int age; EventHandler <Game> pr = Game.ShortInfo; Console.WriteLine("Enter what age rating do you belong to: "); age = ValidationAgeRating(); Console.WriteLine("Enter minimum rating(player or press): "); reatingFirst = Validationfloat(); Console.WriteLine("Games suitable for you: "); for (int i = 0; i < numberOfGames; i++) { for (int j = 0; j <= age; j++) { if (gameArr[i].ReatingSearch(reatingFirst) == 1 && (gameArr[i])[j] == 1) { ElementFound?.Invoke(this, gameArr[i]); Console.WriteLine(""); } } } }
public void StubFrame(string locator, ElementFound frame, Scope scope) { stubbedFrames.Add(new ScopedStubResult { Locator = locator, Scope = scope, Result = frame }); }
public void StubSection(string locator, ElementFound section, Scope scope) { stubbedSections.Add(new ScopedStubResult { Locator = locator, Scope = scope, Result = section }); }
public void StubFieldset(string locator, ElementFound fieldset, Scope scope) { stubbedFieldsets.Add(new ScopedStubResult { Locator = locator, Scope = scope, Result = fieldset }); }
internal SnapshotElementScope(ElementFound elementFound, DriverScope scope) : base(null, scope) { _elementFound = elementFound; }
public AlwaysFindsElementFinder(ElementFound element) : base(null, null, null) { this.element = element; }
private async void StockElementGuessed(string element_found) { ElementFound elementFound = new ElementFound(parameter.connectedUser.username, parameter.trackGuessed.id, element_found, DateTime.Now.ToString()); await apiConnect.PostAsJsonAsync(elementFound, "http://localhost/api/stockelementguessed.php"); }
internal SnapshotElementScope(ElementFound elementFound, DriverScope scope, Options options) : base(null, scope) { this.elementFound = elementFound; this.options = options; }
protected void VerifyFoundRobustly <T>(Func <string, T, Options, Scope> scope, int driverCallIndex, string locator, T text, ElementFound expectedDeferredResult, ElementFound expectedImmediateResult, Options options) { var scopedResult = scope(locator, text, options).Now(); VerifyFoundRobustly(driverCallIndex, expectedDeferredResult, expectedImmediateResult, options, scopedResult); }
protected void Should_find_robustly <T>(Func <string, T, Options, bool> subject, Func <string, T, Options, bool> scope, Action <string, Regex, ElementFound, Scope> stub, T suppliedText, Regex matchingPattern, bool expectedImmediateResult, bool expectedDeferredResult, ElementFound stubCssResult) { var locator = "Find me " + DateTime.Now.Ticks; var individualTimeout = TimeSpan.FromMilliseconds(DateTime.UtcNow.Millisecond); spyRobustWrapper.AlwaysReturnFromRobustly(expectedImmediateResult); stub(locator, matchingPattern, stubCssResult, browserSession); stub(locator, matchingPattern, stubCssResult, elementScope); var options = new Options { Timeout = individualTimeout }; VerifyFoundRobustly(subject, 0, locator, suppliedText, expectedDeferredResult, expectedImmediateResult, options); if (scope != null) { VerifyFoundRobustly(scope, 1, locator, suppliedText, expectedDeferredResult, expectedImmediateResult, options); } }
public void StubId(string id, ElementFound element, Scope scope) { stubbedIDs.Add(new ScopedStubResult { Locator = id, Scope = scope, Result = element }); }
/// <summary> /// Fill in a previously found text field /// </summary> /// <param name="element">The text field</param> /// <returns>With</returns> public FillInWith FillIn(ElementFound element, Options options = null) { return(new FillInWith(element, driver, robustWrapper, this, SetOptions(options))); }
public void StubWindow(string locator, ElementFound window, Scope scope) { stubbedWindows.Add(new ScopedStubResult { Locator = locator, Scope = scope, Result = window }); }
public void StubCurrentWindow(ElementFound window) { stubbedCurrentWindow = window; }
public void SetScope(ElementFound findScope) { }
public void StubId(string id, ElementFound element, Scope scope, SessionConfiguration options) { StubAllXPath(new Html(options.Browser.UppercaseTagNames).Id(id, options), new[] { element }, scope, options); }
public AlwaysFindsElementFinder(ElementFound element) : base(null,null,null) { this.element = element; }
public void StubXPath(string cssSelector, ElementFound result, Scope scope) { stubbedXPathResults.Add(new ScopedStubResult { Locator = cssSelector, Scope = scope, Result = result }); }
/// <summary> /// Fill in a previously found text field /// </summary> /// <param name="element">The text field</param> /// <returns>With</returns> public FillInWith FillIn(ElementFound element, Options options = null) { return new FillInWith(element, driver, robustWrapper, this, SetOptions(options)); }
public void StubLink(string locator, ElementFound element, Scope scope) { stubbedLinks.Add(new ScopedStubResult { Locator = locator, Scope = scope, Result = element }); }
public void OnElementFound(EventArgs e) { Automation.RemoveAllEventHandlers(); ElementFound?.Invoke(this, e); }
public void StubField(string locator, ElementFound element, Scope scope) { stubbedTextFields.Add(new ScopedStubResult { Locator = locator, Scope = scope, Result = element }); }