File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ public override async Task<TaskRes> Execute(Account acc)
54
54
var buttonElement = acc . Wb . Driver . FindElement ( By . XPath ( buttonNode . XPath ) ) ;
55
55
buttonElement . Click ( ) ;
56
56
57
- acc . Wb . UpdateHtml ( ) ;
57
+ var result = await DriverHelper . WaitPageChange ( acc , "dorf" ) ;
58
58
59
- if ( TaskExecutor . IsLoginScreen ( acc ) )
59
+ if ( ! result && TaskExecutor . IsLoginScreen ( acc ) )
60
60
{
61
61
// Wrong password/nickname
62
62
acc . Logger . Warning ( "Password is incorrect!" ) ;
@@ -66,10 +66,8 @@ public override async Task<TaskRes> Execute(Account acc)
66
66
}
67
67
else
68
68
{
69
- await DriverHelper . WaitPageChange ( acc , "dorf" ) ;
70
69
// 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" ) ) ;
73
71
acc . Access . GetCurrentAccess ( ) . IsSittering = ( auction != null && auction . HasClass ( "disable" ) ) ;
74
72
return TaskRes . Executed ;
75
73
}
You can’t perform that action at this time.
0 commit comments