@@ -54,7 +54,7 @@ internal async Task<IEnumerable<ActivityWithSymbol>> ScrapeTransactions()
5454 }
5555
5656 // Press Close button to close the details
57- await page . GetByRole ( AriaRole . Button ) . ClickAsync ( ) ;
57+ await page . GetByRole ( AriaRole . Button , new ( ) { Name = "Close" } ) . ClickAsync ( ) ;
5858
5959 break ;
6060 }
@@ -63,7 +63,7 @@ internal async Task<IEnumerable<ActivityWithSymbol>> ScrapeTransactions()
6363 // Try to close the details if open
6464 try
6565 {
66- await page . GetByRole ( AriaRole . Button ) . ClickAsync ( ) ;
66+ await page . GetByRole ( AriaRole . Button , new ( ) { Name = "Close" } ) . ClickAsync ( ) ;
6767 }
6868 catch
6969 {
@@ -205,8 +205,9 @@ private Task<int> GetTransacionsCount()
205205
206206 // If is Buy or Sell
207207 var isSaving = await page . GetByTestId ( "icon-SAVINGS_PLAN" ) . IsVisibleAsync ( ) ;
208- bool isBuy = await page . GetByTestId ( "icon-BUY" ) . IsVisibleAsync ( ) ;
209- bool isSell = await page . GetByTestId ( "icon-SELL" ) . IsVisibleAsync ( ) ;
208+ var isBuy = await page . GetByTestId ( "icon-BUY" ) . IsVisibleAsync ( ) ;
209+ var isSell = await page . GetByTestId ( "icon-SELL" ) . IsVisibleAsync ( ) ;
210+ var isReinvest = await page . GetByTestId ( "icon-REINVESTMENT" ) . IsVisibleAsync ( ) ;
210211
211212 var isSecurity = await page . GetByTestId ( "icon-SECURITY" ) . IsVisibleAsync ( ) ;
212213 if ( isSecurity )
@@ -231,11 +232,12 @@ private Task<int> GetTransacionsCount()
231232
232233 if ( isSaving ||
233234 isBuy ||
234- isSell )
235+ isSell ||
236+ isReinvest )
235237 {
236238 var date = await GetHistoryDate ( "Execution confirmed" ) ;
237239 Money ? fee = null ;
238- if ( ! isSaving )
240+ if ( ! isSaving && ! isReinvest )
239241 {
240242 fee = await GetMoneyField ( "Order fee" ) ;
241243 }
0 commit comments