man-group / man-group/page-objects
Return PageElement object from Function
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 126
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the PageElement and PageObject behavior used by AdminPage.partial_link. Reproduce the AttributeError when calling click() on the returned object, then verify that the function returns an object on which click() works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100