Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/342.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用硒进入富国油井_Python_Selenium_Selenium Webdriver - Fatal编程技术网

Python 使用硒进入富国油井

Python 使用硒进入富国油井,python,selenium,selenium-webdriver,Python,Selenium,Selenium Webdriver,我正在尝试使用Selenium Webdriver登录我在富国银行的帐户。然而,无论我使用的是Chrome、Firefox还是Edge,我都会被重定向到下面的页面 我假设富国银行正在检测硒元素并重新引导我。我的登录程序是用Python编写的。如果有人使用Selenium成功登录Wells Fargo,请给我一些有关您如何登录的提示。尝试以下代码: from selenium.webdriver import Chrome browser = Chrome() browser.get('htt

我正在尝试使用Selenium Webdriver登录我在富国银行的帐户。然而,无论我使用的是Chrome、Firefox还是Edge,我都会被重定向到下面的页面

我假设富国银行正在检测硒元素并重新引导我。我的登录程序是用Python编写的。如果有人使用Selenium成功登录Wells Fargo,请给我一些有关您如何登录的提示。

尝试以下代码:

from selenium.webdriver import Chrome

browser = Chrome()
browser.get('https://wellsfargo.com')

#GET user element and POST username to element
user = browser.find_element_by_id('userid')
user.send_keys('USERNAME')

#GET user element and POST password to element
passwd = browser.find_element_by_id('password')
passwd.send_keys('PASSWORD')
passwd.submit()
# ===> you should be logged in and redirected to account page. <=== # 
从selenium.webdriver导入Chrome
browser=Chrome()
browser.get('https://wellsfargo.com')
#获取用户元素并将用户名发布到元素
user=browser。通过\u id('userid')查找\u元素
user.send_密钥('USERNAME'))
#获取用户元素并向元素发布密码
passwd=browser。通过\u id(“密码”)查找\u元素\u
passwd.send_密钥(“密码”)
passwd.submit()

#=>您应该登录并重定向到帐户页面。用你的相关HTML、代码试用和错误堆栈跟踪(如果有)更新问题。如果URL是公共的,你能共享它吗?我也有同样的问题。无需任何代码,只需通过chrome
webdriver.chrome()打开从属浏览器,然后尝试使用自己的用户名或密码登录即可。它在非selenium浏览器上工作,但没有由selenium控制的浏览器。我也有同样的问题。