我对测试硒-页面对象模式有疑问。我的代码:
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
如何更改代码?感谢您的帮助!