The name 'PageFactory' does not exist in the current context

I eventually just created a new project, and ported everything over with one difference, the type of project I created was a Visual C# > Test > Unit Test Project, before the project I had created was Visual C# > .Net Core > Class Library project (I was following a tutorial).

I'm not too sure if this changed anything as such or just meant I had a clear project when I re downloaded and installed the NuGet packages, however I can now access the PageFactory class and associated methods. Thanks to everyone who replied.


If anyone faces the same issue, please install from NuGet package manager the following: DotNetSeleniumExtras.PageObjects.Core (3.12.0)


In case anyone else comes across this question, reason why you can't find the PageFactory nowadays is pretty simple: It does not exist.

Namely, with 3.11.0 release of Selenium.Support, PageFactory and ExpectedConditions were marked as obsolete. With Selenium.Support 3.12.0 they have been removed completely. More on that topic here.

Solution to this is to simply add DotNetSeleniumExtras to your packages as those were moved to separate repository. One can also find useful Dreamescaper's fork (NuGet) that has added .NET Core support until the original repo finds an owner.