Return PageElement object from Function
xiaoleATRI opened this issue · 1 comments
xiaoleATRI commented
hi, @eeaston
I have an issue with using PageElement in function
-
I defined function which use parameter 'p1' to locate link element
`class AdminPage(PageObject):def partial_link(self, p1="Admin"):
return PageElement(partial_link_text=p1)` -
When I call click() on the PageElement it shows as following
AttributeError: 'PageElement' object has no attribute 'click'
Seems like the element returned is not selenium element
rinkky commented
class AdminPage(PageObject):
admin_link = PageElement(partial_link_text='Admin')