Skip to content

Commit c4a3a72

Browse files
committed
Merge branch 'fix-29-04-2022' into fix-28-04-2022
2 parents b6b08a2 + be4eaf4 commit c4a3a72

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

TbsCore/Tasks/LowLevel/LoginTask.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public override async Task<TaskRes> Execute(Account acc)
5454
var buttonElement = acc.Wb.Driver.FindElement(By.XPath(buttonNode.XPath));
5555
buttonElement.Click();
5656

57-
acc.Wb.UpdateHtml();
57+
var result = await DriverHelper.WaitPageChange(acc, "dorf");
5858

59-
if (TaskExecutor.IsLoginScreen(acc))
59+
if (!result && TaskExecutor.IsLoginScreen(acc))
6060
{
6161
// Wrong password/nickname
6262
acc.Logger.Warning("Password is incorrect!");
@@ -66,10 +66,8 @@ public override async Task<TaskRes> Execute(Account acc)
6666
}
6767
else
6868
{
69-
await DriverHelper.WaitPageChange(acc, "dorf");
7069
// check sitter account
71-
var auction = acc.Wb.Html.DocumentNode.SelectSingleNode("//a[contains(@class,'auction')]");
72-
70+
var auction = acc.Wb.Html.DocumentNode.Descendants("a").FirstOrDefault(x => x.HasClass("auction"));
7371
acc.Access.GetCurrentAccess().IsSittering = (auction != null && auction.HasClass("disable"));
7472
return TaskRes.Executed;
7573
}

0 commit comments

Comments
 (0)