below is the chunk of html from which i want "disabled="disabled"" deleted and close the dev tools window. iam using selenium-webdriver with c#. Thank you.
<a class="btn btn-success" href="javascript:;" id="SendRFQ" data-loading-text="<i class='fa fa-spinner fa-spin'></i> Processing..." disabled="disabled" onclick="return SubmitRequisitionData("Submitted")">Click to Submit</a>
Try below code to remove attribute from element
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
js.ExecuteScript("document.querySelector('a.btn.btn-success').removeAttribute('disabled')");
P.S. Note that real user will not modify HTML DOM to make link enabled, so if you need your script to simulate user-like behavior you should find another approach to make element enabled...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With