Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用C验证selenium中按钮上的文本是否正确_C#_Selenium - Fatal编程技术网

C# 如何使用C验证selenium中按钮上的文本是否正确

C# 如何使用C验证selenium中按钮上的文本是否正确,c#,selenium,C#,Selenium,我需要验证我按钮上的文本是否正确?如何使用C获取selenium按钮上的文本。谢谢您的回答。实际上,我现在使用此方法获得了它。 公共静态T GetAttributesTypeThis IWebElement元素,字符串attributeName { 字符串值=element.GetAttributeattributeName??string.Empty; 返回TTypeDescriptor.GetConverterTypeSoft.ConvertFromStringvalue; }按钮标签必须有

我需要验证我按钮上的文本是否正确?如何使用C获取selenium按钮上的文本。谢谢您的回答。实际上,我现在使用此方法获得了它。 公共静态T GetAttributesTypeThis IWebElement元素,字符串attributeName { 字符串值=element.GetAttributeattributeName??string.Empty; 返回TTypeDescriptor.GetConverterTypeSoft.ConvertFromStringvalue;
}

按钮标签必须有一个属性值。你可以用它来取,希望这有帮助。!