I\'ve been using Selenium WebDriver to implement functional tests for some projects that I\'ve worked with. I\'m trying to use the Page Object design pattern with Page Facto
The WebElements in a PageFactroy are really proxies to WebElements. This means that every time you access a WebElement it will perform a search to find the element on the page.
This has some advantages:
You are using the @CacheLookup annotation which is losing you the second benefit as it will find the element once and then keep a reference to it, you are now far more likely to see StaleElementExceptions.
That being said you still keep the main benefit which is that Selenium will not go to the page and actually find the element until you first use it.
So in summary all you need to do is move
PageFactory.initElements(driver, this);
Into your constructor and it will all work fine.