コード例 #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
ファイル: HtmlTestPage.Div2.cs プロジェクト: kasthurk/cuite
 // 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
ファイル: HtmlOrderedList.cs プロジェクト: icnocop/cuite
 /// <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
ファイル: HtmlPassword.cs プロジェクト: icnocop/cuite
 /// <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
ファイル: HtmlHeading1.cs プロジェクト: icnocop/cuite
 /// <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
ファイル: HtmlListItem.cs プロジェクト: kasthurk/cuite
 /// <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
ファイル: HtmlListItem.cs プロジェクト: kasthurk/cuite
 /// <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
ファイル: SilverlightPassword.cs プロジェクト: thePantz/cuite
 /// <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
ファイル: HtmlParagraph.cs プロジェクト: icnocop/cuite
 /// <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
ファイル: HtmlHeading1.cs プロジェクト: icnocop/cuite
 /// <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
ファイル: HtmlPassword.cs プロジェクト: icnocop/cuite
 /// <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)
 {
 }