python - Selenium - 元组对象不可调用
问题描述
我对测试硒有问题 - 页面对象模式。我的代码:
class FormPage(Page):
nameConnect = (By.ID, "name")
def nameUser(self,name):
names = self.driver.find_element(*FormPage.nameConnect)
names.send_keys(name)
class testUser(Page):
start_page = FormPage(self.driver)
start_page.nameUser('user22xx')
我的错误:
start_page.nameUser('user22xx')
TypeError: 'tuple' object is not callable
如何更改我的代码?谢谢你的帮助!
解决方案
推荐阅读
- hive - 如何在 Hive 的同一张表中将数据从一列复制到另一列?
- express - Google App Engine,内容安全政策问题
- gojs - 为什么 Go.js 不适用于内联脚本?
- python-3.x - 如何通过odoo中的新模块使用新的菜单项和操作自定义现有模块?
- mysql - MySql SUM(子查询)
- python - 命令不同步,您现在无法运行此命令
- python - NumPy 保存具有不同形状但前导维度相同的数组的对象
- asp.net - Button in GridView Footer not firing
- angular - Can't use MatIcon component
- api - Softlayer:如何从所有发票信息中过滤裸机服务器配置发票信息?