第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

登錄表單提交失敗,沒有拋出錯誤

登錄表單提交失敗,沒有拋出錯誤

猛跑小豬 2021-05-31 17:42:36
剛剛意識到盡管沒有拋出錯誤,但沒有提交登錄表單:from selenium import webdriverdriver_path = "path to chromedriver.exe"url_login = "https://www.findacode.com/signin.html"username = 'jd@mailinator.com'password = 'm%$)-Y95*^.1Gin+' #know it's not best practice to share passwords, but this is a trial account and credentials are necessary to appreciate the problemoptions = webdriver.ChromeOptions()options.add_argument('headless')driver = webdriver.Chrome(executable_path=driver_path, chrome_options=options)driver.get(url_login)form = driver.find_element_by_name('login')form.find_element_by_name('id').send_keys(username)form.find_element_by_name('password').send_keys(password)form.find_element_by_xpath("//input[@value='Sign In']").submit()此時沒有錯誤,但登錄不成功:driver.title 是“登錄 - FindACode.com”,但應(yīng)該是“查找代碼 - ICD 10 代碼、CPT 代碼、HCPCS 代碼、ICD 9 代碼 - 在線編碼器 - 醫(yī)療賬單和編碼”,頁面源的其余部分確認(rèn)登錄失敗我在調(diào)用 .submit() 后嘗試了顯式等待:from selenium.webdriver.support.ui import WebDriverWait as waitfrom selenium.webdriver.support import expected_conditions as ECfrom selenium.webdriver.common.by import Bywait(driver, 10).until(EC.visibility_of_element_located((By.ID, "history"))) # history is an element in post login landing page but not in the pre login page但我收到超時錯誤:Traceback (most recent call last):File "<input>", line 29, in <module>File "...\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in untilraise TimeoutException(message, screen, stacktrace)selenium.common.exceptions.TimeoutException: Message: 我在調(diào)用 .submit() 后嘗試了另一個顯式等待title = "Find-A-Code - ICD 10 Codes, CPT Codes, HCPCS Codes, ICD 9 Codes - Onlne Encoder - Medical Billing and Coding"    wait(driver, 10).until(EC.title_is(title))我收到另一個超時錯誤:Traceback (most recent call last):File "<input>", line 30, in <module>File "...\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in untilraise TimeoutException(message, screen, stacktrace)selenium.common.exceptions.TimeoutException: Message: 根據(jù)這篇文章,我還在調(diào)用 send_keys(password) 之前嘗試等待,以防密碼字段變得陳舊
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 191 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號