Is there a Page Factory in Selenium Python?
QuizMediumPython onlyAsked in: Infosys, TCS, Wipro
An interviewer asks about Page Factory and @FindBy in your Python framework. What is accurate?
- Page Factory and @FindBy are part of Selenium's Java support library; Selenium Python has no Page Factory, so page objects keep locator tuples
- Python uses @FindBy decorators from selenium.webdriver.support
- Python page objects must call PageFactory.init_elements(driver, self)
- Page objects are not possible in Python
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.