Skip to content

Commit

Permalink
Commented out PerformInFrame until we can fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomationPanda committed Jun 1, 2023
1 parent 57c9e8a commit 5d420f4
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 64 deletions.
7 changes: 4 additions & 3 deletions Boa.Constrictor.Selenium/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added `SwitchFrame` and `PerformInFrame` Tasks
- Added automatic waiting to `SwitchFrame`
- Warning: we are investigating some flaky behavior with these new Tasks
- Added `SwitchFrame` Task with automatic waiting
- Addd commented code for a potential `PerformInFrame` Task
- This one is currently exhibiting flaky errors
- We must investigate further before releasing it officially

### Changed

Expand Down
121 changes: 60 additions & 61 deletions Boa.Constrictor.Selenium/Tasks/PerformInFrame.cs
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
// }
// }

0 comments on commit 5d420f4

Please sign in to comment.