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

Fix hard coded values #8

Closed
wants to merge 1 commit into from

Conversation

smakela
Copy link

@smakela smakela commented Sep 9, 2019

  • Updated valid_login.robot with values from resource.robot

- Updated valid_login.robot with values from resource.robot
@pekkaklarck
Copy link
Member

I agree hard coded values aren't a good idea in general, but replacing them with variables makes the test pretty ugly. A much better solution would be changing the test to something like

*** Test Cases ***
Valid login
    Open browser to login page
    Input valid user name
    Input valid password
    Submit credentials
    Welcome page should be open

or possibly to

*** Test Cases ***
Valid login
    Open browser to login page
    Login as valid user with valid password
    Welcome page should be open

The problem with above solutions would be that they don't anymore demonstrate how to pass arguments to keywords. For demo purposes I prefer the current approach.

@pekkaklarck pekkaklarck closed this Sep 9, 2019
@smakela
Copy link
Author

smakela commented Sep 9, 2019

@pekkaklarck Yes. Those would be better solutions. Just learning the whole framework.
Thanks for the good examples!

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

Successfully merging this pull request may close these issues.

2 participants