RedHatQE / RedHatQE/widgetastic.core
Parametrized widgets
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 37
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
We already have parametrized views but a parametrized Widget would also be nice.
Current code sample:
def _remove_recipient(self, email):
Text(self, ".//a[text()='{}']".format(email)).click()
What I would imagine:
class Foo(View):
w = Text(ParametrizedLocator('//something[@important={name|quote}]'))
v = "instance of Foo"
# Widget recognizes that there is a parametrized locator in args and returns a proxy
v.w == "some proxy"
v.w.read() # => triggers an error because it is a proxy
v.w(name='foobar').__locator__() == '//something[@important="foobar"]'
v.w(name='foobar').read() == "something"
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 how parametrized views currently work, then trace how Text and ParametrizedLocator handle their arguments. Use the examples in the issue to define proxy behavior, locator expansion, and read behavior; done means named widget parameters produce the expected locator and usable widget operations while direct proxy reads fail as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100