Class ScrollBar
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
Represents a vertical or horizontal scroll bar control.
public class ScrollBar : Adapter, IAdapter
- Inheritance
-
ScrollBar
- Implements
- Inherited Members
Constructors
ScrollBar()
Creates a new ScrollBar adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected ScrollBar()
ScrollBar(Element)
Creates a new ScrollBar adapter instance.
public ScrollBar(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
Down
Gets the down button portion of this scrollbar.
public Button Down { get; }
Property Value
- Button
The page up button.
Exceptions
- ElementNotFoundException
If the element is not found.
Left
Gets the page-left button portion of this scrollbar.
public Button Left { get; }
Property Value
- Button
The page-left button.
Exceptions
- ElementNotFoundException
If the element is not found.
MaxValue
The maximum scroll value of the scrollbar.
public virtual double MaxValue { get; }
Property Value
MinValue
The minimum scroll value of the scrollbar.
public virtual double MinValue { get; }
Property Value
PageDown
Gets the page-down button portion of this scrollbar.
public Button PageDown { get; }
Property Value
- Button
The page-down button.
Exceptions
- ElementNotFoundException
If the element is not found.
PageLeft
Gets the left button portion of this scrollbar.
public Button PageLeft { get; }
Property Value
- Button
The left button.
Exceptions
- ElementNotFoundException
If the element is not found.
PageRight
Gets the page-right button portion of this scrollbar.
public Button PageRight { get; }
Property Value
- Button
The page right button.
Exceptions
- ElementNotFoundException
If the element is not found.
PageSize
The size of the thumb, which represents the page size.
public virtual double PageSize { get; }
Property Value
PageUp
Gets the page-up button portion of this scrollbar.
public Button PageUp { get; }
Property Value
- Button
The page up button.
Exceptions
- ElementNotFoundException
If the element is not found.
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Right
Gets the right button portion of this scrollbar.
public Button Right { get; }
Property Value
- Button
The right button.
Exceptions
- ElementNotFoundException
If the element is not found.
Style
The scroll bar style (horizontal, vertical or custom).
public virtual Role.ScrollBarStyle Style { get; }
Property Value
Thumb
Gets the thumb indicator portion of the scrollbar.
public Indicator Thumb { get; }
Property Value
- Indicator
The thumb.
Exceptions
- ElementNotFoundException
If the element is not found.
Up
Gets the up button portion of this scrollbar.
public Button Up { get; }
Property Value
- Button
The page up button.
Exceptions
- ElementNotFoundException
If the element is not found.
Value
The current scroll value of the scrollbar.
public virtual double Value { 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 ScrollBar FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- ScrollBar
The ScrollBar.
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 ScrollBar FromPath(string path)
Parameters
pathstringThe search path.
Returns
- ScrollBar
The ScrollBar.
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 ScrollBar(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator ScrollBar(Element element)
Parameters
elementElementThe element to convert.
Returns
- ScrollBar
The ScrollBar.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator ScrollBar(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator ScrollBar(string path)
Parameters
pathstringThe search path.
Returns
- ScrollBar
The ScrollBar.
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.