Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个很长的表格要测试,所以我创建了一个 CompleteForm() 辅助方法来完成表格。为了测试验证,我调用 CompleteForm(),然后使我想要测试的字段无效。无法弄清楚如何取消选中单选按钮。
只需将对象的Checked属性设置为RadioButtonfalse
Checked
RadioButton
false
要取消选中页面上的所有单选按钮,您可以执行以下操作:
foreach(RadioButton rb in ie.RadioButtons) { rb.Checked = false }