<commit_before>using System;
using System.Collections.Generic;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;

namespace Tellurium.MvcPages.WebPages
{
    public class WebTableRow : WebElementCollection<PageFragment>
    {
        private readonly IWebElement webElement;
        private Dictionary<string, int> columnsMap;


        public WebTableRow(RemoteWebDriver driver, IWebElement webElement, Dictionary<string, int> columnsMap) : base(driver, webElement)
        {
            this.webElement = webElement;
            this.columnsMap = columnsMap;
        }

        protected override IWebElement GetItemsContainer()
        {
            return webElement;
        }

        protected override PageFragment MapToItem(IWebElement webElementItem)
        {
            return new PageFragment(Driver, webElementItem);
        }

        public IPageFragment this[string columnName]
        {
            get
            {
                if (string.IsNullOrWhiteSpace(columnName))
                {
                    throw new ArgumentException("Column name cannot be empty", nameof(columnName));
                }
                var index = columnsMap[columnName];
                return this[index];
            }
        }
    }
}<commit_msg>Check if column exist in table<commit_after>using System;
using System.Collections.Generic;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;

namespace Tellurium.MvcPages.WebPages
{
    public class WebTableRow : WebElementCollection<PageFragment>
    {
        private readonly IWebElement webElement;
        private Dictionary<string, int> columnsMap;


        public WebTableRow(RemoteWebDriver driver, IWebElement webElement, Dictionary<string, int> columnsMap) : base(driver, webElement)
        {
            this.webElement = webElement;
            this.columnsMap = columnsMap;
        }

        protected override IWebElement GetItemsContainer()
        {
            return webElement;
        }

        protected override PageFragment MapToItem(IWebElement webElementItem)
        {
            return new PageFragment(Driver, webElementItem);
        }

        public IPageFragment this[string columnName]
        {
            get
            {
                if (string.IsNullOrWhiteSpace(columnName))
                {
                    throw new ArgumentException("Column name cannot be empty", nameof(columnName));
                }
                if (columnsMap.ContainsKey(columnName) == false)
                {
                    throw new ArgumentException($"There is no column with header {columnName}", nameof(columnName));
                }
                var index = columnsMap[columnName];
                return this[index];
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.06943942133815552, 'fraction_numerical': 0.0, 'mean_word_length': 2.003257328990228, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6942507', 'n_tokens_mistral': 686, 'n_tokens_neox': 658, 'n_words': 162}