Class ActorExtensions
- Namespace
- CSF.Screenplay.Selenium
- Assembly
- CSF.Screenplay.Selenium.dll
Extension methods for actors.
public static class ActorExtensions
- Inheritance
-
ActorExtensions
- Inherited Members
Methods
GetLazyElement(ICanPerform, ITarget)
Gets a lazy-loaded SeleniumElement instance for the given actor and target.
public static Lazy<SeleniumElement> GetLazyElement(this ICanPerform actor, ITarget target)
Parameters
actorICanPerformAn actor, who must have the BrowseTheWeb ability.
targetITargetA target which describes an HTML element
Returns
- Lazy<SeleniumElement>
A lazy SeleniumElement, the value of which is the HTML element described by the target.
Exceptions
- ArgumentNullException
If the
actoris null- ArgumentException
If the actor does not implement IHasAbilities
- InvalidOperationException
If the actor does not have the BrowseTheWeb ability
- TargetNotFoundException
If the target does not yield an HTML element
GetLazyElements(ICanPerform, ITarget)
Gets a lazy-loaded SeleniumElementCollection instance for the given actor and target.
public static Lazy<SeleniumElementCollection> GetLazyElements(this ICanPerform actor, ITarget target)
Parameters
actorICanPerformAn actor, who must have the BrowseTheWeb ability.
targetITargetA target which describes a collection of HTML elements
Returns
- Lazy<SeleniumElementCollection>
A lazy SeleniumElementCollection, the value of which is the collection of HTML elements described by the target.
Exceptions
- ArgumentNullException
If the
actoris null- ArgumentException
If the actor does not implement IHasAbilities
- InvalidOperationException
If the actor does not have the BrowseTheWeb ability