Does Webdriver support pagefactory for Python?

前端 未结 3 723
囚心锁ツ
囚心锁ツ 2021-02-15 23:18

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 page

3条回答
  •  长情又很酷
    2021-02-16 00:01

    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

提交回复
热议问题