Do ... While in Error Log
Hello,
I have the following code :
function Test()
{
......
do
{
//login
table = page2.Form("aspnetForm").Panel("divWrapper").Panel("ctl00_sectionHeader").Panel(0).Panel("ctl00_UcHeader_sectionLogin").Panel("ctl00_UcHeader_UcHeaderLogin_Panel1").Table("ctl00_UcHeader_UcHeaderLogin_tableNotLogged");
table.Cell(0, 1).Textbox("ctl00_UcHeader_UcHeaderLogin_txtUsername").Text = "username";
table.Cell(1, 1).PasswordBox("ctl00_UcHeader_UcHeaderLogin_txtPassword").Text = "test01";
table.Cell(2, 0).Panel(0).ImageButton("ctl00_UcHeader_UcHeaderLogin_btnLogin").Click();
//Please wait until download completes:...
page2.Wait();
}
while (page2.Form("aspnetForm").Panel("divWrapper").Panel("ctl00_sectionHeader").Panel(0).Panel("ctl00_UcHeader_sectionLogin").Panel("ctl00_UcHeader_UcHeaderLogin_divLogged").Panel(0).TextNode("ctl00_UcHeader_UcHeaderLogin_lbLoggedIn").textContent != "Currently logged in")
........
}
The idea is that if the login is not successful, retry the login. However, if the first login attempt has failed and the second succeeded, I still get an error for the while part. I've tried modifying it using WaitPage or WaitProcess but no luck.
Please assist.
Thank you,
Andrei