Status page can be shown , a lot of refactoring is still required

This commit is contained in:
2022-02-03 23:03:04 +01:00
parent b776847980
commit 8b74067a10
8 changed files with 175 additions and 13 deletions

View File

@ -1,4 +1,5 @@
using OpenQA.Selenium;
using DataDomain;
using OpenQA.Selenium;
using System;
using System.Collections;
using System.Collections.Generic;
@ -68,9 +69,10 @@ namespace BrowserHelper.Extensions
}
colIndex++;
}
rowIndex++;
antal--;
}
rowIndex++;
if (antal < 1) break;
}
return tableDataCollection;
@ -129,12 +131,12 @@ namespace BrowserHelper.Extensions
}
public static List<Share> GetCertainStocks(this IWebElement element, string[] shares, string[] shareHeaders)
public static List<DiTraderStockRow> GetCertainStocks(this IWebElement element, string[] shares, string[] shareHeaders)
{
List<Share> shareList = new List<Share>();
List<DiTraderStockRow> shareList = new List<DiTraderStockRow>();
var reducedList = ReadTablePartly(element, shares, shareHeaders);
int rNr = -1;
Share Aktie = null;
DiTraderStockRow Aktie = null;
foreach (var shareRow in reducedList)
{
if (shareRow.RowNumber != rNr)
@ -150,17 +152,17 @@ namespace BrowserHelper.Extensions
{
case "Aktie":
{
Aktie.AktieNamn = shareRow.ColumnValue;
Aktie.StockName = shareRow.ColumnValue;
break;
}
case "Senast":
{
Aktie.SenastePris = Convert.ToDecimal(shareRow.ColumnValue);
Aktie.LatestPrice = Convert.ToDecimal(shareRow.ColumnValue);
break;
}
case "Tid":
{
Aktie.RegTime = TimeOnly.Parse(shareRow.ColumnValue);
Aktie.TimeOfDay = TimeSpan.Parse(shareRow.ColumnValue);
break;
}
}