Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return PageElement object from Function #6

Open
xiaoleATRI opened this issue Sep 13, 2017 · 1 comment
Open

Return PageElement object from Function #6

xiaoleATRI opened this issue Sep 13, 2017 · 1 comment

Comments

@xiaoleATRI
Copy link

xiaoleATRI commented Sep 13, 2017

hi, @eeaston

I have an issue with using PageElement in function

  1. 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)`

  2. 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
Copy link

rinkky commented Feb 28, 2019

class AdminPage(PageObject):
    admin_link = PageElement(partial_link_text='Admin')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants