这是我试图访问的代码
<div class="field checkbox">
<label class="radio">
<input payoneer="CheckBox" type="checkbox" name="ctl00$plcMainArea$SignDocument_4_2" validate="validate" data-rule-required="true" data-msg-required="This field is required." hidefocus="hidefocus" class="field-data" id="SignDocument_4_2" data-sign-document-type="4_2"> I agree to the
<a href="pagecontent.payoneer?rsckey=ProcessorTypeDebitCard.ElectronicDisclosure&pid=Y0LwV0AQC7cY%2b5AIqsZl1g%3d%3d" target="_blank">Electronic Disclosures</a>
<a href="pagecontent.payoneer?rsckey=ProcessorTypeDebitCard.Privacy&pid=Y0LwV0AQC7cY%2b5AIqsZl1g%3d%3d" target="_blank">Privacy Policy</a>
</label>
</div>
我正在尝试按 ID 查找元素并单击其上的复选框
driver.FindElement(By.Id("SignDocument_4_2")).Click();
这是我得到的例外
System.InvalidOperationException was unhandled
HResult=-2146233079
Message=unknown error: Element is not clickable at point (257, 955). Other element would receive the click: <a href="pagecontent.payoneer?rsckey=ProcessorTypeDebitCard.ElectronicDisclosure&pid=Y0LwV0AQC7cY%2b5AIqsZl1g%3d%3d" target="_blank">...</a>
(Session info: chrome=48.0.2564.116)
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64)
Source=WebDriver
StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Click()
at Payoneer.Exam.Main(String[] args) in c:\Users\Alberto Chocron\Documents\Visual Studio 2013\Projects\PayoneerTest\Payoneer\Program.cs:line 105
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: