Does Webdriver support pagefactory for Python?

hourback picture hourback · Dec 12, 2011 · Viewed 8.7k times · Source

I was reading about page objects and design patterns on the Webdriver project site and came across pagefactory. It doesn't look like the Webdriver for Python API includes pagefactory. Is this true?

Answer

n1r3 picture n1r3 · Dec 12, 2011

I don't think there is any equivalents of the Java annotations (@Find(By.xxx) etc) in Python. But it doesn't mean that you can't use the PageObject pattern.

You can find good example on how to do here : https://github.com/SeleniumHQ/selenium/blob/master/py/test/selenium/webdriver/common/google_one_box.py