-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commented out PerformInFrame until we can fix it
- Loading branch information
1 parent
57c9e8a
commit 5d420f4
Showing
2 changed files
with
64 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,74 @@ | ||
using System; | ||
using Boa.Constrictor.Screenplay; | ||
// using Boa.Constrictor.Screenplay; | ||
|
||
namespace Boa.Constrictor.Selenium | ||
{ | ||
/// <summary> | ||
/// Performs a list of tasks within a frame then switches to DefaultContent. | ||
/// </summary> | ||
public class PerformInFrame : ITask | ||
{ | ||
#region Constructors | ||
// namespace Boa.Constrictor.Selenium | ||
// { | ||
// /// <summary> | ||
// /// Performs a list of tasks within a frame then switches to DefaultContent. | ||
// /// </summary> | ||
// public class PerformInFrame : ITask | ||
// { | ||
// #region Constructors | ||
|
||
/// <summary> | ||
/// Private constructor. | ||
/// (Use static builder methods to construct.) | ||
/// </summary> | ||
/// <param name="locator">The locator.</param> | ||
/// <param name="tasks">The Task list.</param> | ||
private PerformInFrame(IWebLocator locator, ITask[] tasks) | ||
{ | ||
Locator = locator; | ||
Tasks = tasks; | ||
} | ||
// /// <summary> | ||
// /// Private constructor. | ||
// /// (Use static builder methods to construct.) | ||
// /// </summary> | ||
// /// <param name="locator">The locator.</param> | ||
// /// <param name="tasks">The Task list.</param> | ||
// private PerformInFrame(IWebLocator locator, ITask[] tasks) | ||
// { | ||
// Locator = locator; | ||
// Tasks = tasks; | ||
// } | ||
|
||
#endregion | ||
// #endregion | ||
|
||
#region Properties | ||
// #region Properties | ||
|
||
/// <summary> | ||
/// The locator. | ||
/// </summary> | ||
private IWebLocator Locator { get; } | ||
// /// <summary> | ||
// /// The locator. | ||
// /// </summary> | ||
// private IWebLocator Locator { get; } | ||
|
||
/// <summary> | ||
/// The Task list. | ||
/// </summary> | ||
private ITask[] Tasks { get; } | ||
// /// <summary> | ||
// /// The Task list. | ||
// /// </summary> | ||
// private ITask[] Tasks { get; } | ||
|
||
#endregion | ||
// #endregion | ||
|
||
#region Builder Methods | ||
// #region Builder Methods | ||
|
||
/// <summary> | ||
/// Builder method. | ||
/// </summary> | ||
/// <param name="locator">The locator.</param> | ||
/// <param name="tasks">The Task list.</param> | ||
public static PerformInFrame At(IWebLocator locator, params ITask[] tasks) => | ||
new PerformInFrame(locator, tasks); | ||
// /// <summary> | ||
// /// Builder method. | ||
// /// </summary> | ||
// /// <param name="locator">The locator.</param> | ||
// /// <param name="tasks">The Task list.</param> | ||
// public static PerformInFrame At(IWebLocator locator, params ITask[] tasks) => | ||
// new PerformInFrame(locator, tasks); | ||
|
||
#endregion | ||
// #endregion | ||
|
||
#region Methods | ||
// #region Methods | ||
|
||
/// <summary> | ||
/// Runs the Tasks in the order given by the list. | ||
/// </summary> | ||
/// <param name="actor">The Screenplay Actor.</param> | ||
public void PerformAs(IActor actor) | ||
{ | ||
actor.AttemptsTo(SwitchFrame.To(Locator)); | ||
actor.AttemptsTo(RunTasks.InOrder(Tasks)); | ||
actor.AttemptsTo(SwitchFrame.ToDefaultContent()); | ||
} | ||
// /// <summary> | ||
// /// Runs the Tasks in the order given by the list. | ||
// /// </summary> | ||
// /// <param name="actor">The Screenplay Actor.</param> | ||
// public void PerformAs(IActor actor) | ||
// { | ||
// actor.AttemptsTo(SwitchFrame.To(Locator)); | ||
// actor.AttemptsTo(RunTasks.InOrder(Tasks)); | ||
// actor.AttemptsTo(SwitchFrame.ToDefaultContent()); | ||
// } | ||
|
||
/// <summary> | ||
/// Returns a description of the Task. | ||
/// </summary> | ||
/// <returns></returns> | ||
public override string ToString() => | ||
$"run Tasks within the frame '{Locator.Description}'"; | ||
// /// <summary> | ||
// /// Returns a description of the Task. | ||
// /// </summary> | ||
// /// <returns></returns> | ||
// public override string ToString() => | ||
// $"run Tasks within the frame '{Locator.Description}'"; | ||
|
||
#endregion | ||
} | ||
} | ||
// #endregion | ||
// } | ||
// } |