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

HTML IDs modified #31

Open
xino12 opened this issue May 6, 2016 · 1 comment
Open

HTML IDs modified #31

xino12 opened this issue May 6, 2016 · 1 comment

Comments

@xino12
Copy link

xino12 commented May 6, 2016

When creating a test like this:

- name : Login test
  scenario:
    - Load my website
    - Fill form:
        usernameInput: foo@bar.com
        passwordInput: password
    - Click submit

In the function fill_form from engine.py

The id is received as usernameinput instead of usernameInput.

@crdoconnor
Copy link
Contributor

crdoconnor commented May 6, 2016

Ah. That's because the transformation from test -> code lowercases the arguments to the step so that they'll be consistently pythonic (by convention python methods take underscore_case instead of camelCase).

If you use the enter text step instead (it can be defined in the setup method along with click, etc.)::

self.enter_text = self.cli_steps.enter_text

You can then use this::

- Enter text:
   item: usernameInput
   text: foo@bar.com
- Enter text:
   item: passwordInput
   text: password

Thanks for bringing it up. I might have to rethink this.

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