Пример #1
0
 internal FillInWith(ElementScope element, Driver driver, TimingStrategy timingStrategy, Options options)
 {
     this.element = element;
     this.driver = driver;
     this.timingStrategy = timingStrategy;
     this.options = options;
 }
Пример #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;
 }
Пример #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;
 }
Пример #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;
 }
Пример #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;
 }
Пример #6
0
        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;
        }
Пример #7
0
 public static IEnumerable<SnapshotElementScope> AsSnapshotElementScopes(this IEnumerable<Element> elements, DriverScope driverScope, Options options)
 {
     return elements.Select(elementFound => new SnapshotElementScope(elementFound, driverScope, options));
 }
Пример #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));
 }
Пример #9
0
 public ElementScope Check(Options options = null)
 {
     Try(new Check(driver, this, SetOptions(options)));
     return this;
 }
Пример #10
0
 public override ElementScope SendKeys(string keys, Options options = null)
 {
     RetryUntilTimeout(SendKeysAction(keys, options));
     return this;
 }
Пример #11
0
 public override bool Missing(Options options = null)
 {
     return robustWrapper.Robustly(MissingQuery(options));
 }
Пример #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;
 }
Пример #13
0
 public ElementScope Click(Options options = null)
 {
     Try(new ClickAction(this, driver, Merge(options)));
     return this;
 }
Пример #14
0
 public ElementScope SendKeys(string keys, Options options = null)
 {
     Try(new SendKeys(keys, this, driver, Merge(options)));
     return this;
 }
Пример #15
0
 public bool Missing(Options options = null)
 {
     return Try(new ElementMissingQuery(this, SetOptions(options)));
 }
Пример #16
0
 public ElementScope Click(Options options = null)
 {
     RetryUntilTimeout(new Click(this, driver, SetOptions(options)));
     return this;
 }
Пример #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));
 }
Пример #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)));
 }
Пример #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)));
 }
Пример #20
0
 internal FillInWith(ElementScope element, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
     : this(element.Now(),driver,robustWrapper,scope,options)
 {
 }
Пример #21
0
 public bool Exists(Options options = null)
 {
     return Try(new ElementExistsQuery(this, SetOptions(options)));
 }
Пример #22
0
 public bool Exists(Options options = null)
 {
     return robustWrapper.Robustly(new ElementExistsQuery(this, SetOptions(options)));
 }
Пример #23
0
 public bool HasValue(string text, Options options = null)
 {
     return Try(new HasValueQuery(this, text, Merge(options)));
 }
Пример #24
0
 public ElementScope FillInWith(string value, Options options = null)
 {
     Try(new FillIn(driver, this, value, Merge(options)));
     return this;
 }
Пример #25
0
 public Scope Hover(Options options = null)
 {
     RetryUntilTimeout(new Hover(this, driver, SetOptions(options)));
     return this;
 }
Пример #26
0
 public ElementScope Hover(Options options = null)
 {
     Try(new Hover(this, driver, Merge(options)));
     return this;
 }
Пример #27
0
 public bool Missing(Options options = null)
 {
     return robustWrapper.Robustly(new ElementMissingQuery(this, SetOptions(options)));
 }
Пример #28
0
 public ElementScope Uncheck(Options options = null)
 {
     Try(new Uncheck(driver, this, Merge(options)));
     return this;
 }
Пример #29
0
 public override bool Exists(Options options = null)
 {
     return robustWrapper.Robustly(ExistsQuery(options));
 }
Пример #30
0
 internal RobustElementScope(ElementFinder elementFinder, DriverScope outerScope, Options options)
     : base(elementFinder, outerScope)
 {
     this.options = options;
 }
Пример #31
0
 public override ElementScope Hover(Options options = null)
 {
     RetryUntilTimeout(HoverAction(options));
     return this;
 }