【发布时间】:2014-10-06 23:49:18
【问题描述】:
我需要python方面的帮助... 您知道单击按钮登录(此处:提交)后如何检查网络浏览器的响应吗? 如果我的登录成功,我想比较 html 代码并返回 True 但不幸的是我不知道如何。 :/ 任何提示都是无价的。 :) 这是我的 selenium 代码:
driver.find_element_by_css_selector("input.username").send_keys("margie")
driver.find_element_by_css_selector("input.password").clear()
driver.find_element_by_css_selector("input.password").send_keys("margie")
driver.find_element_by_css_selector("div.btn.submit").click()
我可以使用“如果”吗?
感谢您的宝贵时间!
【问题讨论】:
标签: python html selenium webresponse