Skip to content

locator arg placement inconsistency across widgets #96

@abalakh

Description

@abalakh

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 :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions