Beispiel #1
0
 internal FillInWith(ElementScope element, Driver driver, TimingStrategy timingStrategy, Options options)
 {
     this.element = element;
     this.driver = driver;
     this.timingStrategy = timingStrategy;
     this.options = options;
 }
Beispiel #2
0
 internal FillInWith(string locator, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.locator = locator;
     this.driver = driver;
     this.robustWrapper = robustWrapper;
     this.scope = scope;
     this.options = options;
 }
Beispiel #3
0
 internal SelectFrom(string option, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.option = option;
     this.driver = driver;
     this.robustWrapper = robustWrapper;
     this.scope = scope;
     this.options = options;
 }
Beispiel #4
0
 internal FillInWith(Element element, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.element = element;
     this.driver = driver;
     this.robustWrapper = robustWrapper;
     this.scope = scope;
     this.options = options;
 }
Beispiel #5
0
 internal SelectFrom(string option, Driver driver, TimingStrategy timingStrategy, DriverScope scope, Options options, DisambiguationStrategy disambiguationStrategy)
 {
     this.option = option;
     this.driver = driver;
     this.timingStrategy = timingStrategy;
     this.scope = scope;
     this.options = options;
     this.disambiguationStrategy = disambiguationStrategy;
 }
        public static string GetLoggedInUserFullName(this BrowserSession browser, Options options)
        {
            string actualUserFullName = null;

            // Try finding the user full name from hidden field on site layout first
            var fullNameElement = browser.FindField(UserFullNameId, Make_It.Consider_Invisible_Elements);

            if (fullNameElement.Exists(Make_It.Wait_1_Second))
                actualUserFullName = fullNameElement.Value;
            else
            {
                // Relies on the embedded Submit Feedback form
                var element = browser.FindField(SubmitFeedbackNameId, Make_It.Consider_Invisible_Elements);

                if (element.Exists(Make_It.Wait_1_Second))
                    actualUserFullName = element.Value;
            }

            return actualUserFullName;
        }
 public static IEnumerable<SnapshotElementScope> AsSnapshotElementScopes(this IEnumerable<Element> elements, DriverScope driverScope, Options options)
 {
     return elements.Select(elementFound => new SnapshotElementScope(elementFound, driverScope, options));
 }
Beispiel #8
0
 public BrowserWindow FindWindow(string locator, Options options = null)
 {
     return new RobustWindowScope(driver, SessionConfiguration, robustWrapper, waiter, urlBuilder, SetOptions(options), new WindowFinder(driver, locator, this));
 }
 public ElementScope Check(Options options = null)
 {
     Try(new Check(driver, this, SetOptions(options)));
     return this;
 }
 public override ElementScope SendKeys(string keys, Options options = null)
 {
     RetryUntilTimeout(SendKeysAction(keys, options));
     return this;
 }
 public override bool Missing(Options options = null)
 {
     return robustWrapper.Robustly(MissingQuery(options));
 }
Beispiel #12
0
 internal SelectFrom(string option, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.option        = option;
     this.driver        = driver;
     this.robustWrapper = robustWrapper;
     this.scope         = scope;
     this.options       = options;
 }
Beispiel #13
0
 public ElementScope Click(Options options = null)
 {
     Try(new ClickAction(this, driver, Merge(options)));
     return this;
 }
Beispiel #14
0
 public ElementScope SendKeys(string keys, Options options = null)
 {
     Try(new SendKeys(keys, this, driver, Merge(options)));
     return this;
 }
Beispiel #15
0
 public bool Missing(Options options = null)
 {
     return Try(new ElementMissingQuery(this, SetOptions(options)));
 }
Beispiel #16
0
 public ElementScope Click(Options options = null)
 {
     RetryUntilTimeout(new Click(this, driver, SetOptions(options)));
     return this;
 }
Beispiel #17
0
 /// <summary>
 /// Find an open browser window or tab by its title or name. If no exact match is found a partial match on title will be considered.
 /// </summary>
 /// <param name="locator">Window title or name</param>
 /// <param name="options">
 /// <para>Override the way Coypu is configured to find elements for this call only.</para>
 /// <para>E.g. A longer wait:</para>
 /// 
 /// <code>new Options{Timeout = TimeSpan.FromSeconds(60)}</code></param>
 /// <returns>The matching BrowserWindow scope</returns>
 public BrowserWindow FindWindow(string locator, Options options = null)
 {
     return new RobustWindowScope(new WindowFinder(driver, locator, this, Merge(options)), this, Merge(options));
 }
Beispiel #18
0
 /// <summary>
 /// Check that a dialog with the specified is not present. Returns as soon as the dialog is not present, or when the <see cref="SessionConfiguration.Timeout"/> is reached.
 /// </summary>
 /// <param name="withText">Dialog text</param>
 /// <returns>Whether an element does not appears</returns>
 public bool HasNoDialog(string withText, Options options = null)
 {
     return Query(new HasNoDialogQuery(driver, withText, this, SetOptions(options)));
 }
Beispiel #19
0
 /// <summary>
 /// Cancel the first modal dialog to appear within the <see cref="SessionConfiguration.Timeout"/>
 /// </summary>
 /// <exception cref="T:Coypu.MissingHtmlException">Thrown if the dialog cannot be found</exception>
 public void CancelModalDialog(Options options = null)
 {
     RetryUntilTimeout(new CancelModalDialog(this, driver, SetOptions(options)));
 }
Beispiel #20
0
 internal FillInWith(ElementScope element, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
     : this(element.Now(),driver,robustWrapper,scope,options)
 {
 }
Beispiel #21
0
 public bool Exists(Options options = null)
 {
     return Try(new ElementExistsQuery(this, SetOptions(options)));
 }
Beispiel #22
0
 public bool Exists(Options options = null)
 {
     return robustWrapper.Robustly(new ElementExistsQuery(this, SetOptions(options)));
 }
Beispiel #23
0
 public bool HasValue(string text, Options options = null)
 {
     return Try(new HasValueQuery(this, text, Merge(options)));
 }
Beispiel #24
0
 public ElementScope FillInWith(string value, Options options = null)
 {
     Try(new FillIn(driver, this, value, Merge(options)));
     return this;
 }
Beispiel #25
0
 public Scope Hover(Options options = null)
 {
     RetryUntilTimeout(new Hover(this, driver, SetOptions(options)));
     return this;
 }
Beispiel #26
0
 public ElementScope Hover(Options options = null)
 {
     Try(new Hover(this, driver, Merge(options)));
     return this;
 }
Beispiel #27
0
 public bool Missing(Options options = null)
 {
     return robustWrapper.Robustly(new ElementMissingQuery(this, SetOptions(options)));
 }
Beispiel #28
0
 public ElementScope Uncheck(Options options = null)
 {
     Try(new Uncheck(driver, this, Merge(options)));
     return this;
 }
 public override bool Exists(Options options = null)
 {
     return robustWrapper.Robustly(ExistsQuery(options));
 }
Beispiel #30
0
 internal RobustElementScope(ElementFinder elementFinder, DriverScope outerScope, Options options)
     : base(elementFinder, outerScope)
 {
     this.options = options;
 }
 public override ElementScope Hover(Options options = null)
 {
     RetryUntilTimeout(HoverAction(options));
     return this;
 }