Skip to content

Instantly share code, notes, and snippets.

@YevgeniyShunevych
Created March 5, 2019 13:38
Show Gist options
  • Save YevgeniyShunevych/853f44675b95bcb045ba3d919b9cedab to your computer and use it in GitHub Desktop.
Save YevgeniyShunevych/853f44675b95bcb045ba3d919b9cedab to your computer and use it in GitHub Desktop.
Atata dynamic URL navigation using argument #2
using Atata;
using NUnit.Framework;
namespace SampleApp.UITests
{
public class SampleTests : UITestFixture
{
[Test]
public void GoToWorkspacePageById()
{
Go.To(WorkspacePage.ById(5));
}
}
}
using Atata;
namespace SomeApp.UITests
{
using _ = WorkspacePage;
public class WorkspacePage : Page<_>
{
public int? WorkspaceId { get; set; }
public static _ ById(int id)
{
return new _ { WorkspaceId = id };
}
protected override void Navigate()
{
Go.ToUrl($"/path/{WorkspaceId}/subpath");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment