Edit stocklist. add stocks,

This commit is contained in:
2022-02-07 23:58:10 +01:00
parent b3d1a46c6c
commit d56e69b448
12 changed files with 87 additions and 43 deletions

View File

@ -1,12 +1,6 @@
using DataDomain;
using Helpers;
using OpenQA.Selenium;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BrowserHelper.Extensions
{
@ -86,14 +80,14 @@ namespace BrowserHelper.Extensions
IWebElement tblBody = table.FindElement(By.XPath(".//tbody"));
var rows = tblBody.FindElements(By.TagName("tr"));
Dictionary<string, int> columnPos = new Dictionary<string, int>();
GlobalStopwatch.PrintSecs("After allocations");
//GlobalStopwatch.PrintSecs("After allocations");
for (int i = 0; i < columns.Count; i++)
{
if (shareHeaders.Contains(columns[i].Text)) columnPos.Add(columns[i].Text, i);
}
var antal = shares.Length;
int rowIndex = 0;
GlobalStopwatch.PrintSecs("Before scraplooping");
//GlobalStopwatch.PrintSecs("Before scraplooping");
foreach (var row in rows)
{
var element = row.FindElement(By.XPath(".//td"));
@ -116,7 +110,7 @@ namespace BrowserHelper.Extensions
}
if (antal < 1) break;
}
GlobalStopwatch.PrintSecs("After scraplooping");
//GlobalStopwatch.PrintSecs("After scraplooping");
return shareCollection;
}