Bagikan melalui


HtmlControl Class

Provides a base class for controls to test the user interface (UI) of Web pages.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.UITesting.UITestControl
    Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlControl
      More...

Namespace:  Microsoft.VisualStudio.TestTools.UITesting.HtmlControls
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
Public Class HtmlControl _
    Inherits UITestControl
public class HtmlControl : UITestControl
public ref class HtmlControl : public UITestControl
type HtmlControl =  
    class
        inherit UITestControl
    end
public class HtmlControl extends UITestControl

The HtmlControl type exposes the following members.

Constructors

  Name Description
Public method HtmlControl() Initializes a new instance of the HtmlControl class.
Public method HtmlControl(UITestControl) Initializes a new instance of the HtmlControl class.

Top

Properties

  Name Description
Public property AccessKey Gets the value of the AccessKey attribute of this control.
Public property BoundingRectangle Gets the Bounding rectangle for this control. (Inherited from UITestControl.)
Public property Class Gets the value of the Class attribute of this control.
Public property ClassName Gets the class name for this control. (Inherited from UITestControl.)
Public property Container Gets or sets the container of this UITestControl. (Inherited from UITestControl.)
Public property ControlDefinition Gets the definition of the control in the HTML page.
Public property ControlType Gets the type of the UI Control. (Inherited from UITestControl.)
Public property Enabled Gets a value that indicates whether this control is enabled. (Inherited from UITestControl.)
Public property Exists Gets a value that indicates whether this control exists on the user interface. (Inherited from UITestControl.)
Public property FilterProperties Gets the property-value pair collection that is used to disambiguate a control. (Inherited from UITestControl.)
Public property FriendlyName Gets the name of this control to use in the user interface. (Inherited from UITestControl.)
Public property HasFocus Gets a value that indicates whether this control currently has the focus in the user interface. (Inherited from UITestControl.)
Public property HelpText Gets the value of the HelpText attribute of this control.
Public property Id Gets the value of the ID attribute of this control.
Public property InnerText Gets the text content of this control.
Public property IsTopParent Gets a value that indicates whether this control is the top-level element. (Inherited from UITestControl.)
Public property Name Gets the name of this control. (Inherited from UITestControl.)
Public property NativeElement Gets the native technology element that corresponds to this control. (Inherited from UITestControl.)
Public property SearchConfigurations Gets or sets search configurations. (Inherited from UITestControl.)
Public property SearchProperties Gets the property-value pair collection that is used to identify a control. (Inherited from UITestControl.)
Protected property SearchPropertiesSetExplicitly Gets a value that indicates whether the search properties for this control were set by the user in the user interface. (Inherited from UITestControl.)
Public property TagInstance Gets the index of the control in the collection of controls on the page that has the same tag name.
Public property TagName Gets the tag name of this control.
Public property TechnologyName Gets or sets the technology framework that implements this control. (Inherited from UITestControl.)
Public property Title Gets the value of the Title attribute of this control.
Public property TopParent Gets the top-level parent of this control. (Inherited from UITestControl.)
Public property Type Gets the value of the Type attribute of this control.
Public property ValueAttribute Gets the value of the Value attribute of this control.
Public property WindowHandle Gets the window handle for this control. (Inherited from UITestControl.)
Public property WindowTitles Gets a collection of the window titles of the top-level window. (Inherited from UITestControl.)

Top

Methods

  Name Description
Public method CaptureImage Captures the image of the UITestControl. The UITestControl must be present on the screen. (Inherited from UITestControl.)
Public method CopyFrom Creates a UITestControl object that references the same element on the user interface as the original UITestControl. (Inherited from UITestControl.)
Public method DrawHighlight Highlights the control. (Inherited from UITestControl.)
Public method EnsureClickable() Scrolls the user interface to make sure that the control is clickable. (Inherited from UITestControl.)
Public method EnsureClickable(Point) Scrolls the user interface to a specific point to make sure that the control is clickable. (Inherited from UITestControl.)
Public method Equals Determines whether the specified UITestControl is equal to the current UITestControl. (Inherited from UITestControl.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Find Finds the UITestControl. (Inherited from UITestControl.)
Public method FindMatchingControls Returns a collection of all UITestControls that match the specified SearchProperties and FilterProperties. (Inherited from UITestControl.)
Public method GetChildren Returns a collection of all first-level children of the current UITestControl. (Inherited from UITestControl.)
Public method GetClickablePoint Returns a clickable point on the control. (Inherited from UITestControl.)
Public method GetHashCode Returns a unique value that represents the current UITestControl instance. (Inherited from UITestControl.)
Public method GetParent Returns the parent of the current UITestControl. (Inherited from UITestControl.)
Public method GetProperty Gets the value of the specified property. (Inherited from UITestControl.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method GetUITestControlsForSearch Returns an array of UITestControl objects that will be used for searching. (Inherited from UITestControl.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetFocus Sets the keyboard focus to the UITestControl. (Inherited from UITestControl.)
Public method SetProperty Sets the value of a given property. (Inherited from UITestControl.)
Public method ToString Returns a String that represents the current UITestControl. (Inherited from UITestControl.)
Public method TryGetClickablePoint Returns a clickable point in the UITestControl. If the control is not clickable, this method returns false. (Inherited from UITestControl.)
Public method WaitForControlCondition(Predicate<UITestControl>) Blocks the current thread until this control meets the specified condition, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlCondition(Predicate<UITestControl>, Int32) Blocks the current thread until this control meets the specified condition, or until the specified time-out expires. (Inherited from UITestControl.)
Public method WaitForControlEnabled() Blocks the current thread until this control is enabled, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlEnabled(Int32) Blocks the current thread until this control is enabled, or until the specified time-out expires. (Inherited from UITestControl.)
Public method WaitForControlExist() Blocks the current thread until this control occurs in the user interface, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlExist(Int32) Blocks the current thread until this control occurs in the user interface, or until the specified time-out expires. (Inherited from UITestControl.)
Public method WaitForControlNotExist() Blocks the current thread until this control no longer exists in the user interface, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlNotExist(Int32) Blocks the current thread until this control no longer occurs in the user interface, or until the specified time-out expires. (Inherited from UITestControl.)
Public method WaitForControlPropertyEqual(String, Object) Blocks the current thread until the specified property of this control is equal to the specified value, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlPropertyEqual(String, Object, Int32) Blocks the current thread until the specified property of this control is equal to the specified value, or until the specified time-out expires. (Inherited from UITestControl.)
Public method WaitForControlPropertyNotEqual(String, Object) Blocks the current thread until the specified property of this control is not equal to the specified value, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlPropertyNotEqual(String, Object, Int32) Blocks the current thread until the specified property of this control is not equal to the specified value, or until the specified time-out expires. (Inherited from UITestControl.)
Public method WaitForControlReady() Blocks the current thread until this control is ready to receive mouse or keyboard input, or until the default time-out expires. (Inherited from UITestControl.)
Public method WaitForControlReady(Int32) Blocks the current thread until this control is ready to receive mouse or keyboard input, or until the specified time-out expires. (Inherited from UITestControl.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.UITesting.HtmlControls Namespace

UITestControl

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.UITesting.UITestControl
    Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlControl
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlAreaHyperlink
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlButton
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlCell
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlCheckBox
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlComboBox
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlCustom
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlDiv
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlDocument
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlEdit
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlEditableDiv
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlEditableSpan
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlFileInput
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlFrame
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlHeaderCell
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlHyperlink
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlIFrame
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlImage
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlInputButton
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlLabel
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlList
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlListItem
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlRadioButton
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlRow
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlScrollBar
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlSpan
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlTable
      Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlTextArea