예제 #1
0
파일: ByTest.cs 프로젝트: kasthurk/cuite
        public void AndClass()
        {
            // Act
            By configuration = new By().AndClass("SomeClass");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
        }
예제 #2
0
파일: ByTest.cs 프로젝트: kasthurk/cuite
        public void AndId()
        {
            // Act
            By configuration = new By().AndId("SomeId");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
        }
예제 #3
0
파일: By.cs 프로젝트: kasthurk/cuite
 /// <summary>
 /// Adds a mechanism to find controls by specified automation id.
 /// </summary>
 /// <param name="automationId">The automation id.</param>
 /// <param name="conditionOperator">
 /// The operator to use to compare the values (either the values are equal or the property
 /// value contains the provided property value).
 /// </param>
 /// <returns>
 /// The mechanisms by how particular instances of <see cref="UITestControl"/> are found in
 /// the UI.
 /// </returns>
 public static By AutomationId(
     string automationId,
     PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo)
 {
     var by = new By();
     by.configurators.Add(new AutomationIdConfigurator(automationId, conditionOperator));
     return by;
 }
예제 #4
0
파일: ByTest.cs 프로젝트: kasthurk/cuite
        public void AndValueAttribute()
        {
            // Act
            By configuration = new By().AndValueAttribute("SomeValueAttribute");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
        }
예제 #5
0
파일: ByTest.cs 프로젝트: kasthurk/cuite
        public void AndSearchProperties()
        {
            // Act
            By configuration = new By().AndSearchProperties("SomeName=SomeValue");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
        }
예제 #6
0
파일: ByTest.cs 프로젝트: kasthurk/cuite
        public void AndTagName()
        {
            // Act
            By configuration = new By().AndTagName("SomeTagName");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
        }
예제 #7
0
파일: ByTest.cs 프로젝트: thePantz/cuite
        public void AndControlName()
        {
            // Act
            By configuration = new By().AndControlName("SomeControlName");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
            Assert.AreEqual(PropertyExpressionOperator.EqualTo, configuration.Configuration.First().PropertyOperator);
        }
예제 #8
0
파일: ByTest.cs 프로젝트: thePantz/cuite
        public void AndClassNameContains()
        {
            // Act
            By configuration = new By().AndClassNameContains("SomeClassName");

            // Assert
            Assert.AreEqual(1, configuration.Configuration.Count);
            Assert.AreEqual(PropertyExpressionOperator.Contains, configuration.Configuration.First().PropertyOperator);
        }
예제 #9
0
 // TODO: The factory should be able to create instances with default constructor
 // ReSharper disable once UnusedParameter.Local
 // the constructor requires a parameter in order for it to be dynamically created by CUITe
 public Div2(By searchConfiguration)
     : base(By.Id("div2"))
 {
 }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlOrderedList"/> class.
 /// </summary>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlOrderedList(By searchConfiguration = null)
     : this(new CUITControls.HtmlCustom(), searchConfiguration)
 {
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlPassword"/> class.
 /// </summary>
 /// <param name="sourceControl">The source control.</param>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlPassword(CUITControls.HtmlEdit sourceControl, By searchConfiguration = null)
     : base(sourceControl, searchConfiguration)
 {
     AddSearchProperty(CUITControls.HtmlControl.PropertyNames.Type, "PASSWORD");
 }
예제 #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlHeading1"/> class.
 /// </summary>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlHeading1(By searchConfiguration = null)
     : this(new CUITControls.HtmlCustom(), searchConfiguration)
 {
 }
예제 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlListItem"/> class.
 /// </summary>
 /// <param name="sourceControl">The source control.</param>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlListItem(CUITControls.HtmlCustom sourceControl, By searchConfiguration = null)
     : base(sourceControl, searchConfiguration)
 {
 }
예제 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlListItem"/> class.
 /// </summary>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlListItem(By searchConfiguration = null)
     : this(new CUITControls.HtmlCustom(), searchConfiguration)
 {
 }
예제 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SilverlightPassword" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="searchConfiguration">The search configuration.</param>
 public SilverlightPassword(UITestControl parent, By searchConfiguration = null)
     : this(new CUITControls.SilverlightEdit(parent), searchConfiguration)
 {
 }
예제 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SilverlightPassword"/> class.
 /// </summary>
 /// <param name="searchConfiguration">The search configuration.</param>
 public SilverlightPassword(By searchConfiguration = null)
     : this(new CUITControls.SilverlightEdit(), searchConfiguration)
 {
 }
예제 #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SilverlightPassword"/> class.
 /// </summary>
 /// <param name="sourceControl">The source control.</param>
 /// <param name="searchConfiguration">The search configuration.</param>
 public SilverlightPassword(CUITControls.SilverlightEdit sourceControl, By searchConfiguration = null)
     : base(sourceControl, searchConfiguration)
 {
 }
예제 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlParagraph"/> class.
 /// </summary>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlParagraph(By searchConfiguration = null)
     : this(new CUITControls.HtmlCustom(), searchConfiguration)
 {
 }
예제 #19
0
파일: By.cs 프로젝트: thePantz/cuite
 /// <summary>
 /// Adds a mechanism to find controls by specified part of the automation id.
 /// </summary>
 /// <param name="automationIdPart">The part of the automation id.</param>
 /// <returns>
 /// The mechanisms by how particular instances of <see cref="UITestControl"/> are found in
 /// the UI.
 /// </returns>
 public static By AutomationIdContains(string automationIdPart)
 {
     var by = new By();
     by.configurators.Add(new AutomationIdConfigurator(automationIdPart, PropertyExpressionOperator.Contains));
     return by;
 }
예제 #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlHeading1"/> class.
 /// </summary>
 /// <param name="sourceControl">The source control.</param>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlHeading1(CUITControls.HtmlCustom sourceControl, By searchConfiguration = null)
     : base(sourceControl, searchConfiguration)
 {
     AddSearchProperty(CUITControls.HtmlControl.PropertyNames.TagName, TagName);
 }
예제 #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlPassword"/> class.
 /// </summary>
 /// <param name="searchConfiguration">The search configuration.</param>
 public HtmlPassword(By searchConfiguration = null)
     : this(new CUITControls.HtmlEdit(), searchConfiguration)
 {
 }