Skip to content

Instantly share code, notes, and snippets.

@testautomationtribe
Last active August 6, 2016 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save testautomationtribe/5c6ac6d5f22738877771149ca4c1ef6d to your computer and use it in GitHub Desktop.
Save testautomationtribe/5c6ac6d5f22738877771149ca4c1ef6d to your computer and use it in GitHub Desktop.
using OpenQA.Selenium;
using OpenQA.Selenium.Support.PageObjects;
namespace TatAutomationFramework.Web
{
public class DoInitialize
{
private static IWebDriver _driver;
public static T PageElementsIn<T>() where T : new()
{
_driver = TestBase.driver;
var page = new T();
PageFactory.InitElements(_driver, page);
return page;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment