코드를 실행할 때 부실 요소 예외가 발생합니다. 그러나 디버깅하는 동안이 예외가 발생하지 않습니다. 여기 내 코드 조각이 있습니다. 아무도 나를 도울 수 있습니까? 코드보고에서 감사셀레늄 부실 요소 예외 (디버깅 도중 테스트를 실행할 때 발견됨)
public static bool CheckListFilterResult(IList<IWebElement> gridColumns, IList<IWebElement> gridRows, string filterColumn, List<string> filters)
{
bool checkResult = false;
{
int filterColumnIndex = GetColumnIndex(gridColumns, filterColumn);
if (gridRows.Count > 0)
{
foreach (IWebElement row in gridRows)
{
TestManager.Doc.Step("before bool match");
bool filterMatch = filters.Contains(row.FindElements(By.TagName("td"))[filterColumnIndex].Text.Trim());
if (filterMatch)
{
checkResult = true;
}
else
{
checkResult = false;
break;
}
}
}
}
return checkResult;
}
}
희망이 도움? – JeffC
bool filterMatch = filters.Contains (row.FindElements (BytagName ("td")) [filterColumnIndex] .Text.Trim()); – J12345