Class SelectTag
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Web.dll
The HTML 'select' tag.
public class SelectTag : WebElement, IAdapter
- Inheritance
-
SelectTag
- Implements
- Inherited Members
Constructors
SelectTag()
Creates a new SelectTag adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected SelectTag()
SelectTag(Element)
Creates a new SelectTag adapter instance.
public SelectTag(Element element)
Parameters
elementElementThe element to create the adapter for.
Exceptions
- NullReferenceException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Properties
AutoFocus
The 'autofocus' attribute of the element.
public virtual string AutoFocus { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Name
The 'name' attribute of the element.
public virtual string Name { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Options
Gets the list of 'option' tags contained within the 'select' tag.
public IList<OptionTag> Options { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
SelectBox
Gets the currently open select box for a select tag.
public Container SelectBox { get; }
Property Value
- Container
The select box or null if no select box is currently open.
Size
The 'size' attribute of the element.
public virtual string Size { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Tabindex
The 'tabindex' attribute of the element.
public virtual string Tabindex { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Title
The 'title' attribute of the element.
public virtual string Title { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static SelectTag FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- SelectTag
The SelectTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
FromPath(string)
Converts a string to an instance of this class by searching the root.
public static SelectTag FromPath(string path)
Parameters
pathstringThe search path.
Returns
- SelectTag
The SelectTag.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Operators
implicit operator SelectTag(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator SelectTag(Element element)
Parameters
elementElementThe element to convert.
Returns
- SelectTag
The SelectTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator SelectTag(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator SelectTag(string path)
Parameters
pathstringThe search path.
Returns
- SelectTag
The SelectTag.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.