Created
March 5, 2019 13:38
-
-
Save YevgeniyShunevych/853f44675b95bcb045ba3d919b9cedab to your computer and use it in GitHub Desktop.
Atata dynamic URL navigation using argument #2
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; | |
using NUnit.Framework; | |
namespace SampleApp.UITests | |
{ | |
public class SampleTests : UITestFixture | |
{ | |
[Test] | |
public void GoToWorkspacePageById() | |
{ | |
Go.To(WorkspacePage.ById(5)); | |
} | |
} | |
} |
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 _ = 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