Class FindsByAttribute
Inspired from original Selenium Page Objects, this attribute allows you to quickly create ElementDescription inside a PageModel.
Inheritance
Implements
Inherited Members
Namespace: AxaFrance.WebEngine.Web
Assembly: AxaFrance.WebEngine.Web.dll
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]
public sealed class FindsByAttribute : Attribute, _Attribute
Remarks
You can use this attribute by specifying the How and Using properties to indicate how to find the elements. This attribute can be used to decorate fields and properties in your Page Object classes. The System.Type of the field or property must be subtypes of ElementDescription. Any other type will throw an System.ArgumentException when a PageModel is initialized.
Compared to original FindsByAttributes implemented in Selenium Support 3.x package, we have removed Priority
, CustomFinderType
which is not used in the logic of element locating.
Constructors
| Improve this Doc View SourceFindsByAttribute()
Initializing an instance of FindsByAttribute
Declaration
public FindsByAttribute()
FindsByAttribute(How, String)
Initializing an instance of FindsByAttribute with parameters.
Declaration
public FindsByAttribute(How how, string using)
Parameters
Type | Name | Description |
---|---|---|
How | how | |
System.String | using |
Properties
| Improve this Doc View SourceHow
Gets or sets the method used to look up the element
Declaration
public How How { get; set; }
Property Value
Type | Description |
---|---|
How |
Using
Gets or sets the value to lookup by (i.e. for How.Name, the actual name to look up)
Declaration
public string Using { get; set; }
Property Value
Type | Description |
---|---|
System.String |