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

locator arg placement inconsistency across widgets #96

Open
abalakh opened this issue May 16, 2018 · 0 comments
Open

locator arg placement inconsistency across widgets #96

abalakh opened this issue May 16, 2018 · 0 comments
Assignees

Comments

@abalakh
Copy link

abalakh commented May 16, 2018

Some of widgets are accepting locator arg as first arg, e.g. Text(), Table(), Select(), etc.
Others (usually inputs) - as a third or forth, the first one for them is name. Few examples are TextInput(), Checkbox().
This brings some confusion, as sometimes i have to specify locator= and sometimes i don't:

class MyView(View):
    table = Table('//locator')
    selected = Checkbox(locator='//locator')
    flash = FlashMessages('//locator')
    file = FileInput(locator='//locator')
    message = Text('//locator')
    input = TextInput(locator='//locator')

If i knew locator is always third arg - i'd always define my widgets like Text(locator='//locator'). If i knew it's always first - i'd never have to specify locator= at all. Current state of things just provokes to make common mistake and introduces some extra time for debugging :)

@izapolsk izapolsk self-assigned this Dec 5, 2018
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