Commit 763d38c7 authored by Minkush Jain's avatar Minkush Jain

added feature to generate random strings for username and email

parent 035b87f8
import pytest
import string
import random
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
......@@ -8,11 +10,16 @@ from github_register import *
class TestRegisteration:
def test_github_account(self):
def test_github_account(self):
user_email = "fsdgsdf@xyz.com"
username = "dsfvsedbsdf"
random_id = ''.join([random.choice(string.ascii_letters
+ string.digits) for n in range(8, 18)])
random_string = random_id
user_email = random_string + "@xyz.com"
username = random_string
github_account(username, user_email, "testpassword1234")
WebDriverWait(browser, 10)
text="You’ve taken your first step into a larger world, @" + username + "."
assert browser.find_element_by_class_name("lead").text == text
assert browser.find_element_by_class_name("lead").text == text
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment