I have written this code for selenium c sharp web driver.i want to bind csv file to extract value from the csv file but i am getting error like this
var convertVal = TestContext.DataRow["FirstCountryByText"].ToString();
var intoval = TestContext.DataRow["SecondCountryByText"].ToString();
var input = TestContext.DataRow["Input"].ToString();
var expectedValue = TestContext.DataRow["ExpectedValue"].ToString();
driver.Navigate().GoToUrl("http://www.oanda.com/currency/converter/");
//driver.FindElement(By.Id("quote_amount_input")).Clear();
//driver.FindElement(By.Id("quote_amount_input")).SendKeys("1");
var setValueConvert = driver.FindElement(By.Id("quote_currency_input"));
var setValueInto = driver.FindElement(By.Id("base_currency_input"));
var inputt = driver.FindElement(By.Id("quote_amount_input"));
var transfervalue = driver.FindElement(By.Id("base_amount_input"));
var selectConvertItem = new SelectElement(setValueConvert);
var selectinto = new SelectElement(setValueInto);
var inputte = new SelectElement(inputt);
var convertval=new SelectElement(transfervalue);
selectConvertItem.SelectByText(convertVal);
selectConvertItem.SelectByText(intoval);
selectConvertItem.SelectByValue(input);
var currencyValue = transfervalue.GetAttribute("value");
Thread.Sleep(900);
Assert.AreEqual(expectedValue, currencyValue);