BUG352-NEIL2 #59
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "BUG352-NEIL2"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
hello sir check my request
@neil
Thanks.
I verified your bug fix and it works.
In addition, I made a few commits on your branch.
TODO
Hui
@neil
Thanks for the new video. It looks and sounds great.
I also notice that you have kept the same Tab. That's great.
Hui
@ -0,0 +6,4 @@
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
@pytest.mark.generate_password_1
@neil
Why have
@pytest.mark.generate_password_1 necessary
? Likewise for@pytest.mark.generate_password_2
.It seems that this decorator causes
PytestUnknownMarkWarning
on the console.@ -0,0 +21,4 @@
login_button = driver_open.find_element('id', "login_btn")
# login as a TA
@neil
The comment should be
# login as a Lecturer
.@ -0,0 +28,4 @@
login_button.click()
admin_tab = driver_open.find_element('id', 'admin_tab')
admin_tab.click()
print("login sucessfully")
@neil
The
print
statement actually has no effect. It won't print things on console.@ -0,0 +38,4 @@
def createTA(driver, TA_name, emails, password):
full_name = driver.find_element('name', 'fullname')
full_name.send_keys(TA_name)
email= driver.find_element('name', 'email')
@neil
There should be a whitespace before the operator
=
.Make sure that there is a whitespace before and after
=
in each assignment statement.@ -0,0 +35,4 @@
t = time.localtime()
current_time = time.strftime("%H:%M:%S", t)
time.sleep(25)
def createTA(driver, TA_name, emails, password):
@neil
Why not move this helper function
createTA()
out oftest_createTA()
?Also, probably it is a good idea to create a helper function for logging in, to avoid code duplication.
@ -0,0 +45,4 @@
usr_type=driver.find_element('name', 'type')
usr_type.click()
click_create =driver.find_element('name', 'create_btn')
click_create.click()
@neil
Please sleep for 3 seconds before clicking the Create button.
@ -0,0 +93,4 @@
else:
driver_open.quit()
try:
with open('TEST_CREATING_TA.txt', 'a') as test_output:
@neil
Do we still need to write to a file?
@ -0,0 +116,4 @@
login_button = driver_open.find_element('id', "login_btn")
# login as a TA
# login as a Lecturer
@ -0,0 +1,205 @@
import re
@neil
Did not test the undesirable case that the Lecturer tries to create an existing TA account.
Please add a test function called
test_create_an_existing_TA_account()
.https://share.weiyun.com/I6ojWg0E this is the updated video link.