0
我想使用selenium執行javascript。使用selenium執行javascript
在UI的JavaScript代碼:
<input id="rbSingleFuture" class="rfdRealInput" type="radio" onclick="javascript:setTimeout('__doPostBack(\'rbSingleFuture\',\'\')', 0)" value="rbSingleFuture" name="PaymentTypeGrp" _rfddecoratedid="_rfdSkinnedrbSingleFuture"></input>
我的代碼:
IJavaScriptExecutor js = (IJavaScriptExecutor)_webDriver;
js.ExecuteScript("onclick=javascript:setTimeout(__doPostBack('rbSingleFuture',''), 0);");
這不單選按鈕上點擊。