|
@@ -17,7 +17,7 @@ def main_sign_in(driver):
|
|
|
def sign_in_vc(driver):
|
|
|
image = get_image(driver)
|
|
|
image = image.convert('RGB')
|
|
|
- image.save('D:\同步文件\课程文件\文档\mcbbs搞事\AutoTool\VerificationCode\image.jpg')
|
|
|
+ image.save('D:\\同步文件\\课程文件\文档\\mcbbs搞事\\AutoTool\\VerificationCode\\image.jpg')
|
|
|
img_path = 'D:\同步文件\课程文件\文档\mcbbs搞事\AutoTool\VerificationCode\image.jpg'
|
|
|
result, rid = base64_api(uname='Shellmiao', pwd='sBif.9MMF8Pa', img=img_path)
|
|
|
print(result)
|
|
@@ -41,7 +41,9 @@ def click_vc_words(driver, locations, rid):
|
|
|
location[0] = location[0] * 0.5
|
|
|
location[1] = location[1] * 0.5
|
|
|
print(location)
|
|
|
- ActionChains(driver).move_to_element_with_offset(element, location[0], location[1]).click().perform()
|
|
|
+ temp = ActionChains(driver).move_to_element_with_offset(element, location[0], location[1])
|
|
|
+ time.sleep(2)
|
|
|
+ temp.click().perform()
|
|
|
time.sleep(1)
|
|
|
time.sleep(1)
|
|
|
button = driver.find_element_by_class_name('geetest_commit_tip')
|
|
@@ -86,7 +88,7 @@ def sign_in(driver):
|
|
|
|
|
|
|
|
|
def get_image(driver):
|
|
|
- time.sleep(2)
|
|
|
+ time.sleep(8)
|
|
|
element = driver.find_element_by_class_name('geetest_widget')
|
|
|
vc_image = get_vc_image(element)
|
|
|
return vc_image
|