我想向网站发送一个号码。但你不能这样做因为程序挂起了。代码:
input_code_user = input('Input code and press Enter:')
WebDriverWait(driver, timeout=10).until(lambda x: x.find_element_by_xpath("//label[@my-i18n='login_number_input_placeholder']")).click()
WebDriverWait(driver, timeout=10).until(lambda x: x.find_element_by_xpath("//input[@ng-model='credentials.phone_code']")).send_keys(input_code_user)
此表单的代码如下所示: 如果单击此字段,它将如下所示: 在以前代码所在的同一个地方,它被替换为一个新代码: 该程序依赖于此代码:
WebDriverWait(driver, timeout=10).until(lambda x: x.find_element_by_xpath("//input[@ng-model='credentials.phone_code']")).send_keys(input_code_user)
我试图在这行代码之后截取屏幕截图,但它没有创建。该计划有效,但没有任何反应。帮我找到解决方案。