使用c#的selenium新手,我试图在字段集表单上找到单选按钮:
driver.FindElement(By.TagName("html")).Click();
driver.SwitchTo().Frame(".//*[@id='fieldset'");
driver.FindElement(By.XPath("(//a[contains(text(),'Complaints and suggestions')])[2]")).Click();
driver.FindElement(By.CssSelector(".wpcf7-list-item.first>label>input")).Click();
driver.FindElement(By.XPath("//input[@name='CatalystResident' value='Yes']")).Click();
var location = driver.FindElement(By.ClassName("wpcf7-form-control wpcf7-select wpcf7-validates-as-required"));
SelectElement catalystLocation = new SelectElement(location);
catalystLocation.SelectByText("London-Brent");
无法找到获取错误消息元素。感谢
相关的html代码
<div class="anti-social-form">