Test Automation Framework (Selenium with Java) — Daddy Issues or Page Factory and Elements Related Exceptions
S01E05 of the Test Automation Framework series about everything you’ll need to set up the nice, simple, yet sophisticated framework.
Covered with clear explanations and pretty illustrations.
Sounds like fun? Cool. Now, please, fasten your seatbelts because you’re here for a ride.
Oh. You’re using PageFactory. Oh dear. I’m sorry. I’m so, so sorry.
Which got me thinking: “what’s this about?”. After a while, I’ve found the StackOverflow thread where people were talking about Selenium’s implementation of the PageFactory.
Here’s Simon Stewart, Selenium project lead and creator of the Page Factory, at the 2017 SeleniumConf in Austin. During his keynote address he says not to use Page Factory. This section of the talk starts here:
Actual statement is at 27:25.
I watched the video, and I recommend it, but there wasn’t anything regarding why using the PageFactory is a bad idea. I mean, like a real-world example.