Skip to content

Instantly share code, notes, and snippets.

@coding-yogi
Created September 26, 2016 10:09
Show Gist options
  • Save coding-yogi/e69a09f2175a0e558bea80741176e59f to your computer and use it in GitHub Desktop.
Save coding-yogi/e69a09f2175a0e558bea80741176e59f to your computer and use it in GitHub Desktop.
public T ClickNext<T>() where T : PageOps
{
_page.SubmitDetails.Click();
if (typeof(T) == GetType())
return (T)Convert.ChangeType(this, typeof(T));
return (T)Activator.CreateInstance(typeof(T), new object[] { PageOpsContextExtension });
}
//return page 1
.ClickNext<MentorInformationPageOps>()
//return page 2
.ClickNext<AdminInformationPageOps>()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment