[英]Unable to click on Sign-in button
<div class="form-group dl-padding-10">
<select class="form-control form-control-solid" name="SelectedRoleID" id="SelectedRoleID" onchange="removeBorderColor()" required="">
</select>
<div class="dl-align-left" id="show_text" style="color:red">
</div>
</div>
<div class="circle1-mask form-group" id="FingerprintContent" style="height:140px;z-index:2; background-image: none;">
<img src="Assets/img/fingerprint4.gif" id="fingerprint-img" data-status="active" style="height:140px; width:100px;" onclick="DeviceScript.scanFingerPrint(event)">
</div>
<div class="form-group dl-padding-10">
<button type="submit" id="register-btn" class="btn btn-block dl-button-primary dl-no-margin">Sign In (For Testing Purpose Only)</button>
</div>
</div>
</div>
</form> </div>
</div>
<button type="submit" id="register-btn" class="btn btn-block dl-button-primary dl-no-margin">Sign In (For Testing Purpose Only)</button>
U can find the HTML code with most information above.您可以在上面找到大多数信息的 HTML 代码。
HTML for the button is present in the last line of the above code.按钮的 HTML 出现在上述代码的最后一行。
My coding:[code][2]我的编码:[code][2]
Error which i get:我得到的错误:
OpenQA.Selenium.ElementClickInterceptedException : element click intercepted: Element <button type="submit" id="register-btn" class="btn btn-block dl-button-primary dl-no-margin">...</button> is not clickable at point (758, 646). Other element would receive the click: <div class="footer navbar-fixed-bottom">...</div>
Kindly help me out on this.请帮我解决这个问题。
To click on registered button Induce WebDriverWait
and wait for ElementToBeClickable
点击注册按钮 Induce WebDriverWait
并等待ElementToBeClickable
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.Id("register-btn"))).Click();
If you still have the same issue then you need to induce Javascript
Executor to click.如果您仍然有同样的问题,那么您需要诱导Javascript
执行器点击。
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
js.ExecuteScript("arguments[0].click();", driver.FindElement(By.Id("register-btn")));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.