我正在读关于页面对象 http://code.google.com/p/selenium/wiki/PageObjects和 Webdriver 项目网站上的设计模式,并遇到了页面工厂 http://code.google.com/p/selenium/wiki/PageFactory。看起来 Webdriver for Python API 不包含 pagefactory。这是真的?
我认为 Python 中没有任何与 Java 注释(@Find(By.xxx) 等)等效的东西。但这并不意味着您不能使用 PageObject 模式。
您可以在这里找到有关如何操作的好示例:https://github.com/SeleniumHQ/selenium/blob/master/py/test/selenium/webdriver/common/google_one_box.py https://github.com/SeleniumHQ/selenium/blob/master/py/test/selenium/webdriver/common/google_one_box.py
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)