public void Open() { string dateFormatted = DateOps.DateToPolishFormatInString(competitionDate); string expectedString = competitionName + " " + dateFormatted + " " + competitionDescription; string xpathToRowPostion = "]/td[4]/a[2]"; TableOps.FindAndOpenRowInTable(expectedString, xpathToRowPostion); }
public void Open() { string dateFormatted = DateOps.DateToPolishFormatInString(date); string expectedString = trainingName + " " + dateFormatted; string xpathToRowPostion = "]/td[3]/a[2]"; TableOps.FindAndOpenRowInTable(expectedString, xpathToRowPostion); }
public void Delete() { string dateFormatted = DateOps.DateToPolishFormatInString(competitionDate); string expectedString = competitionName + " " + dateFormatted + " " + competitionDescription; string xpathToRowPostion = "]/td[4]/a[3]"; TableOps.FindAndOpenRowInTable(expectedString, xpathToRowPostion); var deleteButton = Driver.Instance.FindElement(By.XPath("//form/div/input")); deleteButton.Click(); }
private void ParseQueryItemFilters(QueryProtocol queryItem) { foreach (FilterProtocol filter in queryItem.Filters) { if (!ClarifyApplication.Instance.SchemaCache.IsValidField( queryItem.ObjectName, filter.Field)) { throw new ApplicationException(string.Format("'{0}' is not a valid field for object '{1}'.", filter.Field, queryItem.ObjectName)); } SchemaFieldBase field = ClarifyApplication.Instance.SchemaCache.GetField(queryItem.ObjectName, filter.Field); NumberOps numberOp; switch (field.CommonType) { case (int)SchemaCommonType.String: StringOps strOp = (StringOps)GetParsedFilterOperation(typeof(StringOps), filter, queryItem.ObjectName); queryItem.ClarifyGeneric.AppendFilter(filter.Field, strOp, filter.Value); break; case (int)SchemaCommonType.Date: DateOps dateOp = (DateOps)GetParsedFilterOperation(typeof(DateOps), filter, queryItem.ObjectName); DateTime dateVal = GetParsedFilterValueToDateTime(filter, queryItem.ObjectName); queryItem.ClarifyGeneric.AppendFilter(filter.Field, dateOp, dateVal); break; case (int)SchemaCommonType.Float: case (int)SchemaCommonType.Double: case (int)SchemaCommonType.Decimal: numberOp = (NumberOps)GetParsedFilterOperation(typeof(NumberOps), filter, queryItem.ObjectName); Decimal decVal = GetParsedFilterValueToDecimal(filter, queryItem.ObjectName); queryItem.ClarifyGeneric.AppendFilter(filter.Field, numberOp, decVal); break; case (int)SchemaCommonType.Integer: numberOp = (NumberOps)GetParsedFilterOperation(typeof(NumberOps), filter, queryItem.ObjectName); int intVal = GetParsedFilterValueToInetger(filter, queryItem.ObjectName); queryItem.ClarifyGeneric.AppendFilter(filter.Field, numberOp, intVal); break; default: throw new InvalidOperationException(string.Format("Parse logic not implemented for SchemaCommonType.{0}", field.CommonType)); } } }