2017-10-30 11:11:58 +00:00
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
2017-08-31 13:39:41 +00:00
|
|
|
def set_password_as_new_user(*args):
|
2017-08-28 10:02:20 +00:00
|
|
|
for view in args:
|
|
|
|
view.request_password_icon.click()
|
2017-09-26 10:50:34 +00:00
|
|
|
view.chat_request_input.send_keys("qwerty1234")
|
2017-08-28 10:02:20 +00:00
|
|
|
view.confirm()
|
2017-09-26 10:50:34 +00:00
|
|
|
view.chat_request_input.send_keys("qwerty1234")
|
2017-08-28 10:02:20 +00:00
|
|
|
view.confirm()
|
2017-10-23 20:46:49 +00:00
|
|
|
view.find_full_text(
|
|
|
|
"Here is your signing phrase. You will use it to verify your transactions. Write it down and keep it safe!")
|
2017-09-26 10:50:34 +00:00
|
|
|
|
|
|
|
|
2017-10-30 11:11:58 +00:00
|
|
|
def change_user_details(*args):
|
|
|
|
users_details = dict()
|
|
|
|
for device, view in enumerate(args):
|
|
|
|
current_time = datetime.now().strftime('%-m%-d%-H%-M%-S')
|
|
|
|
new_status = '#newstatus_%s' % current_time
|
|
|
|
new_username = 'New_User_Name_%s' % current_time
|
|
|
|
|
|
|
|
view.user_status_box.click()
|
|
|
|
view.user_status_input.clear()
|
|
|
|
view.user_status_input.send_keys(new_status)
|
|
|
|
view.username_input.clear()
|
|
|
|
view.username_input.send_keys(new_username)
|
|
|
|
view.save_button.click()
|
|
|
|
|
|
|
|
users_details[device] = dict()
|
|
|
|
users_details[device]['status'] = new_status
|
|
|
|
users_details[device]['name'] = new_username
|
|
|
|
return users_details
|
|
|
|
|
|
|
|
|
2017-10-23 10:23:14 +00:00
|
|
|
def recover_access(home, passphrase, password, username):
|
|
|
|
login = home.recover_button.click()
|
2017-09-26 10:50:34 +00:00
|
|
|
login.passphrase_input.send_keys(passphrase)
|
|
|
|
login.password_input.send_keys(password)
|
|
|
|
login.confirm_recover_access.click()
|
|
|
|
recovered_user = login.element_by_text(username, 'button')
|
2017-10-05 19:41:17 +00:00
|
|
|
login.confirm()
|
2017-09-26 10:50:34 +00:00
|
|
|
recovered_user.click()
|
|
|
|
login.password_input.send_keys(password)
|
|
|
|
login.sign_in_button.click()
|
2017-10-05 19:41:17 +00:00
|
|
|
login.find_full_text('Chats', 60)
|