Skip to content

Instantly share code, notes, and snippets.

@YevgeniyShunevych
Created March 5, 2019 13:34
Show Gist options
  • Save YevgeniyShunevych/4089a8defc7202dd77a69a66a3cca345 to your computer and use it in GitHub Desktop.
Save YevgeniyShunevych/4089a8defc7202dd77a69a66a3cca345 to your computer and use it in GitHub Desktop.
Atata dynamic URL navigation using argument
using Atata;
using NUnit.Framework;
namespace SampleApp.UITests
{
public class SampleTests : UITestFixture
{
[Test]
public void GoToWorkspacePageById()
{
Go.To(new WorkspacePage { WorkspaceId = 5 });
}
}
}
using Atata;
namespace SomeApp.UITests
{
using _ = WorkspacePage;
public class WorkspacePage : Page<_>
{
public int? WorkspaceId { get; set; }
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