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
namespace Atata | |
{ | |
/// <summary> | |
/// Represents the "Select 2" dropdown control (class: "select2-container"). | |
/// </summary> | |
/// <typeparam name="T">The type of the control's data.</typeparam> | |
/// <typeparam name="TOwner">The type of the owner.</typeparam> | |
[ControlDefinition(ContainingClass = "select2-container", ComponentTypeName = "select")] | |
public class Select2<T, TOwner> : EditableField<T, TOwner> | |
where TOwner : PageObject<TOwner> |
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
namespace Atata | |
{ | |
[ControlDefinition("input[@type='password']", ComponentTypeName = "password input")] | |
[ValueGetFormat("{0}")] | |
[ValueSetFormat("{0}")] | |
public class SecurePasswordInput<TOwner> : Input<string, TOwner> | |
where TOwner : PageObject<TOwner> | |
{ | |
protected override string ConvertValueToString(string value) | |
{ |
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
namespace Atata.AngularJS.Material | |
{ | |
[ControlDefinition("md-option", ComponentTypeName = "option")] | |
public class MDOption<T, TOwner> : Field<T, TOwner> | |
where TOwner : PageObject<TOwner> | |
{ | |
[FindByClass("md-text")] | |
public Text<TOwner> Text { get; private set; } | |
protected override T GetValue() |
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
namespace Atata | |
{ | |
public static class EditableFieldExtensions | |
{ | |
public static TOwner SetAndAssert<T, TOwner>(this EditableField<T, TOwner> editableField, T value) | |
where TOwner : PageObject<TOwner> | |
{ | |
editableField.Set(value); | |
return editableField.Should.Equal(value); |
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
using System; | |
using System.Collections.Generic; | |
namespace Atata | |
{ | |
public class FindInShadowDomAttribute : FindAttribute | |
{ | |
public FindInShadowDomAttribute(params string[] shadowContainerXPaths) | |
{ | |
ShadowContainerXPaths = shadowContainerXPaths; |
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
using System.Linq; | |
namespace Atata | |
{ | |
public class WaitAndSwitchToNextWindowAttribute : TriggerAttribute | |
{ | |
public WaitAndSwitchToNextWindowAttribute(TriggerEvents on = TriggerEvents.AfterClick, TriggerPriority priority = TriggerPriority.Medium) | |
: base(on, priority) | |
{ | |
} |
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
using Atata; | |
namespace SomeApp.UITests | |
{ | |
using _ = SamplePage; | |
public class SamplePage : Page<_> | |
{ | |
public Control<_> GetSomeControl(string attributeValue) | |
{ |
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
using Atata; | |
namespace SomeApp.UITests | |
{ | |
using _ = SamplePage; | |
public class SamplePage : Page<_> | |
{ | |
public Control<_> GetSomeSpecificControl(string text) | |
{ |
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
namespace Atata | |
{ | |
public class FindByPrecedingSpanAttribute : FindByXPathAttribute | |
{ | |
public FindByPrecedingSpanAttribute(params string[] terms) | |
: this(TermMatch.Equals, terms) | |
{ | |
} | |
public FindByPrecedingSpanAttribute(TermMatch match, params string[] terms) |
NewerOlder