Webdriver 是否支持 Python 的 pagefactory? [英] Does Webdriver support pagefactory for Python?

查看:37
本文介绍了Webdriver 是否支持 Python 的 pagefactory?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Webdriver 项目网站上阅读了有关页面对象和设计模式的信息并遇到了 pagefactory.它看起来不像 Python API 的 Webdriver 包含 pagefactory.这是真的吗?

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?

推荐答案

我认为 Python 中没有任何等效的 Java 注释(@Find(By.xxx) 等).但这并不意味着您不能使用 PageObject 模式.

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.

您可以在此处找到有关如何操作的好示例:https://github.com/SeleniumHQ/selenium/blob/master/py/test/selenium/webdriver/common/google_one_box.py

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

这篇关于Webdriver 是否支持 Python 的 pagefactory?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆