2011-02-07 71 views
0

我有下面的代码页面被重定向回硒

selenium.Open("/logon.aspx") 
    selenium.type(strUsernameID, pUsername) 
    selenium.type(strPasswordId, pPassword) 
    selenium.Click(strButtonId) 
    selenium.WaitForPageToLoad(600000) 
    selenium.click("link=Home") 
    selenium.system.threading.thread.sleep(300000) 
    selenium.WaitForPageToLoad(600000) 

但只要我单击Home链接其重定向到登录页面。此代码可以正常使用另一个网址。我试着把ID,一切。但不知道为什么它的行为如此。请帮助我。因为这可以很好地与其他系统一起工作......只需更改网址。

回答

0

你能说出点击链接后为什么会有线程睡眠吗?我认为,登录后页面可能会超时。