Interface IWebTestObject
A generic Web test object used only for implementation. Do not use to describe a concrete web test object.
public interface IWebTestObject : IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider
- Inherited Members
- Extension Methods
Properties
Attributes
Returns a copy of the collection of attributes that is attached to the element for instance 'id','class',etc.
IReadOnlyDictionary<string, string> Attributes { get; }
Property Value
ClassName
The object's CSS class.
string ClassName { get; }
Property Value
Id
The object's HTML identifier.
string Id { get; }
Property Value
InnerHTML
The HTML code contained between the object's start and end tags.
string InnerHTML { get; }
Property Value
InnerText
The text contained between the object's start and end tags.
string InnerText { get; }
Property Value
Name
The object's name property.
string Name { get; }
Property Value
OuterHTML
The object's HTML code and its content.
string OuterHTML { get; }
Property Value
OuterText
The object's text.
string OuterText { get; }
Property Value
Styles
Returns the element's computed styles as a dictionary with the name of the style as the key.
IReadOnlyDictionary<string, string> Styles { get; }
Property Value
Remarks
Returns an empty collection when run against Internet Explorer 8 or when the document mode of another Internet Explorer version is set to Internet 8 or earlier.
TagName
The object's HTML tag.
string TagName { get; }
Property Value
Title
The element's title attribute.
string Title { get; }
Property Value
Methods
Describe<TChild>(IDescription)
Describes a child test object.
TChild Describe<TChild>(IDescription description) where TChild : class, ITestObject
Parameters
descriptionIDescriptionThe child test object description.
Returns
- TChild
The requested child test object with its description.
Type Parameters
TChildThe child test object type.
Remarks
The current instance test object is the parent of the returned test object. This test object is searched for only when an operation on this test object is invoked. This means that if the test object is not found in the application, this command will still succeed. In this case, an exception is thrown only when an operation is invoked.
Describe<TChild>(CSSDescription)
Describes a child test object using the provided CSS selector.
TChild Describe<TChild>(CSSDescription cssSelector) where TChild : class, IWebElement
Parameters
cssSelectorCSSDescriptionThe CSS selector query used to find the child test object.
Returns
- TChild
The requested child test object with its description.
Type Parameters
TChildThe child test object type.
Remarks
The current instance test object is the parent of the returned test object. This test object is searched for only when an operation on this test object is invoked. This means that if the test object is not found in the application, this command will still succeed. In this case, an exception is thrown only when an operation is invoked.
Describe<TChild>(XPathDescription)
Describes a child test object using the provided XPath.
TChild Describe<TChild>(XPathDescription xpath) where TChild : class, IWebElement
Parameters
xpathXPathDescriptionThe XPath used to find the child test object.
Returns
- TChild
The requested child test object with its description.
Type Parameters
TChildThe child test object type.
Remarks
The current instance test object is the parent of the returned test object. This test object is searched for only when an operation on this test object is invoked. This means that if the test object is not found in the application, this command will still succeed. In this case, an exception is thrown only when an operation is invoked.
GetAttribute(string)
Returns the value of a single attribute.
string GetAttribute(string attributeName)
Parameters
attributeNamestringThe attribute name for the value to retrieve.
Returns
- string
The value of the specified attribute (null if the attribute does not exist).
GetComputedStyle(string)
Returns the value of a single style.
string GetComputedStyle(string styleProperty)
Parameters
stylePropertystringThe style property for the value to retrieve.
Returns
- string
The value of the specified style (null if the style property does not exist).