规范流:
Then i verify the available fruits
| fruits |
| Apple |
| Orange |
Xpath://div[@class='fru_cl']/span
- 这将返回元素集合
在我的步骤定义中:
将表格值转换为字符串列表。
我如何在运行时获取值并比较并判断哪个不可用! (最好断言让它失败)
最佳答案
您可以将来自 specflow 的输入作为表格获取:
public void MyTestMethod(Table table)
{
IEnumerable<string> fruits = table.CreateSet<string>();
//Assert Something
}
关于c# - Selenium C# - 将表值与可用值进行比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53480875/