0

我正在尝试通过他们的网页登录 gmail。

我使用斜纹布设置电子邮件和密码字段,提交它,但再次获得相同的表单。

from twill.commands import *
b = get_browser()
b.go("http://www.gmail.com")
f = b.get_form("1")
f["Email"] = "email@gmail"
f["Passwd"] = "passwd"
b.submit()

下一页再次具有相同的形式。

Form #1
## ## __Name__________________ __Type___ __ID________ __Value__________________
1     GALX                     hidden    (None)       R5TkYbaTJMA 
2     continue                 hidden    (None)       https://mail.google.com/mail/ 
3     service                  hidden    (None)       mail 
4     rm                       hidden    (None)       false 
5     ltmpl                    hidden    (None)       default 
6     scc                      hidden    (None)       1 
7     ss                       hidden    (None)       1 
8     _utf8                    hidden    _utf8        ☃ 
9     bgresponse               hidden    bgresponse   js_disabled 
10    Email                    email     Email         
11    Passwd                   password  Passwd        
12 1  signIn                   submit    signIn       Sign in 
13    PersistentCookie         hidden    (None)       yes 
4

1 回答 1

0

尝试发送ENTER密钥或单击登录按钮。

在 Java 中:

driver.findElement(By.id("signIn")).click();
于 2014-06-28T22:30:13.737 回答