Keynote - Selenium: State of the Union - Simon Stewart – Selenium Project & WebDriver
Why Stack Overflow recommends it
Stack Overflow users link it as the authoritative source for the Selenium lead's advice not to use PageFactory or implicit waits.
Recommended by 2 people across 7 different months, 2017 to 2025.
What it is
A 2017 Selenium Conference keynote by Simon Stewart, lead committer on Selenium and creator of WebDriver. He covers the state of the W3C WebDriver spec, the Software Freedom Conservancy, how to contribute, and lessons learned from the project.
What people said
Recommends Craig Brett · 2018-09 · Stack Overflow · on “Explicit Wait for findElements in Selenium Webdriver”
@Cosmin: Even one of the original Selenium creators doesn't rate Expected Conditions, as one of our test automation specialists pointed out when I spoke to him regarding this. So, I try to avoid ExpectedConditions. See this video from one of his keynotes to see how he feels about it: [this video]
Recommends JeffC · 2018-12 · Stack Overflow · on “In the Page Object Model, why do we use Webelements instead of Strings as class variables?”
This is not defined as part of the page object model, this is defined by PageFactory which is a helper class in initializing elements in a page object. The intent there is to set up a proxy so that the element's location strategy is defined by the @FindBy and you can reference the WebElement and it will go look it up for you when you use the reference. If you are going to store locators, don't store a string... store instead a By locator. It has the extra information of the TYPE of locator, e.g. By.id, By.cssSelector, etc. I think this is much cleaner approach and will prevent you from having to somehow determine what type of locator that string variable is. This is the approach I use in all
Recommends JeffC · 2020-06 · Stack Overflow · on “Replace implicit wait with explicit wait (selenium webdriver & java)”
@eusoubrasileiro Some of it is from reading lots of articles, etc. but I don't remember one off the top of my head. I do remember seeing Simon Stewart at seleniumconf a couple years ago in his keynote speech saying not to use it. Simon Stewart is the lead of the Selenium project. You can find his keynote at [this video] That's queued up to where he comments on implicit wait and not to use it. There are others that I saw at seleniumconf that year where contributors were commenting about it but I don't remember which videos.
Recommends JeffC · 2021-02 · Stack Overflow · on “Selenium code in PyCharm(Python) running slow, how to improve speed?”
Implicit waits are a bad practice according to several Selenium contributors including Simon Stewart, Selenium project lead. See his seleniumconf talk: [this video] Explicit waits should be used instead.
Recommends JeffC · 2024-12 · Stack Overflow · on “I am trying to create UI framework using selenium java but facing issue in initiating webdriver not sure whether this is advisable to do”
The Selenium lead and devs recommend that you NOT use PageFactory, see this video [this video] . If you need PageFactory, you should be able to convert what I have pretty simply.
Recommends JeffC · 2025-01 · Stack Overflow · on “Unable to select the product scope in selenium”
There's an easier way to do this... Rather than grabbing all product names and then looping through each to find the one with the desired product name, you can just use the XPath to specify the product name. This will be simpler, faster, and a lot less code. If it were me, I would create a page object for the product page and add a method that adds a product to the cart. This makes it a lot easier to maintain and easily reusable. With this method, you can just pass in any product name and it will be added to the cart. public void AddProductToCart(String productName) { new WebDriverWait(driver, Duration.ofSeconds(10)).until(ExpectedConditions.elementToBeClickable(By.xpath("//div[./h5[.='" + p
Recommends JeffC · 2025-06 · Stack Overflow · on “Is there any difference of using By class and @FindBy annotation while designing automation framework in POM?”
According to Simon Stewart, Selenium project lead: Don't use PageFactory [this video] Don't use implicit waits [this video] I would suggest watching the full video but I've linked to the specific timestamps above. In addition to the reasons Simon gave in the video linked above, you are going to have issues with @FindBy when you have to access an element more than once. A simple scenario: You use @FindBy to find element, accountBalance Navigate to page Check current account balance, accountBalance Transfer $1 from account and page refreshes Check current account balance, accountBalance On the second check, Selenium is going to throw a stale element exception because the page (or partial page) was refre
Cites JeffC · 2017-04 · Stack Overflow · on “java.lang.ClassCastException: In Web-DriverWait when using PageFactory with POM”
You are casting the variable categories to a WebElement when it's already a WebElement . Change this line waitClick((WebElement) categories); to this waitClick(categories); and it should get rid of the exception. Another problem you are going to run into is that your waitClick() function is casting a WebElement into a By . You don't need the cast there. Better yet, you should be waiting for the element to be clickable before you click it. I would rewrite it like the below. public void waitClick(WebElement element) { new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(element)).click(); } Further more, the creator of Selenium, Simon Stewart, recommends not using Page F
Cites JeffC · 2017-09 · Stack Overflow · on “Why use Page Factory?”
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: [this video] Actual statement is at 27:25.
Cites JeffC · 2018-07 · Stack Overflow · on “How do I implement the Page Object Pattern C# Code described below with selenium?”
To be clear, this is not the page object pattern you are asking about. It's PageFactory attributes. See the docs [LINK] . BTW, the Selenium contributors recommend NOT using PageFactory. It was written as example code of things you can do, not intended for people to actually use. See Simon Stewart, lead committer, state this here [this video] .