forked from gunesmes/page-object-python-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.py
More file actions
18 lines (15 loc) · 765 Bytes
/
users.py
File metadata and controls
18 lines (15 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from operator import itemgetter
# we can store test data in this module like users
users = [
{"name": "invalid_user", "email": "invalidUser@test.com", "password": "qwert1235"},
{"name": "valid_user", "email": "validUser@yahoo.com", "password": "ValidPassword"},
{"name": "Staff2", "email": "staff@test.com", "password": "qwert1235"},
{"name": "Admin0", "email": "admin@test.com", "password": "qwert1234"},
{"name": "Admin1", "email": "admin@test.com", "password": "qwert1234"},
{"name": "Admin2", "email": "admin@test.com", "password": "qwert1234"},
]
def get_user(name):
try:
return next(user for user in users if user["name"] == name)
except:
print("\n User %s is not defined, enter a valid user.\n" % name)