RadWindowsWrapper
要素をクリックすると問題が発生し、現在の名前の要素を認識しますTelerik
(下のキャプチャを参照)。これはTelerik
ポップアップ ウィンドウですが、ブラウザのポップアップ ウィンドウではありません。これらの要素(ラジオボタンとテキスト)を取得しようと何度か試みましたが、成功しませんでした
以下に例を示します: (要素はウィンドウf1
のフレームで、サブ要素です)Quota Settings
f2
WebElement f1 = driver.findElement(By.id("RadWindowWrapper_ctl00_RadWindow_QuotaSettings"));
WebElement f2 = f1.findElement(By.xpath("//*[@id='Panel_QuotaSettings']"));
コンパイラからエラーメッセージが表示されますno element was found...
これがページのビューソースです:
<form id="form1" action="Users.aspx" method="post">
<div id="RadWindowWrapper_ctl00_RadWindow_QuotaSettings" class="RadWindow RadWindow_Default rwNormalWindow rwTransparentWindow" style="width: 432px; height: 307px; position: absolute; transform: none; backface-visibility: visible; visibility: visible; left: 744px; top: 207px; z-index: 3002;" unselectable="on">
<table class="rwTable" cellspacing="0" cellpadding="0" style="height: 307px;">
<tbody>
<tr class="rwTitleRow">
<tr class="rwContentRow">
<td class="rwCorner rwBodyLeft"> </td>
<td class="rwWindowContent rwExternalContent" valign="top">
<iframe frameborder="0" name="RadWindow_QuotaSettings" src="QuotaSettings.aspx?WindowType=Single&rwndrnd=0.4441132272970014" style="width: 100%; height: 100%; border: 0px none; top: -10000px;" tabindex="0">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html class="RadForm RadForm_Default rfdButton rfdScrollBars rfdZone rfdLabel rfdHeading rfdTextbox rfdTextarea rfdFieldset rfdRadio rfdCheckbox rfdGrids" xmlns="http://www.w3.org/1999/xhtml" style="">
<head id="Head1">
<body style="">
<form id="form1" action="QuotaSettings.aspx?WindowType=Single&rwndrnd=0.4441132272970014" method="post">
<div class="aspNetHidden">
<script type="text/javascript">
<script type="text/javascript" src="/Control/1.1.0.3/WebResource.axd?d=PcHC8Z_NQfDA_cv9GRehCSy-wMODQnJn5RDPjMXn0whea2YnXtTlCc5n52dCBmVTOj7JUYqnQ-a-m583yhJmaNOSB1k1&t=634964064498108000">
<script type="text/javascript" src="/Control/1.1.0.3/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager_QuotaSettings_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a387126a6-cbc0-46b4-b6ca-c8de25a0044f%3aea597d4b%3ab25378d2">
<script type="text/javascript">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/Core.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/jQuery.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Ajax/Ajax.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/FormDecorator/RadFormDecorator.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/Popup/PopupScripts.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/jQueryPlugins.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/TouchScrollExtender.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/Navigation/OData/OData.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Common/Navigation/NavigationScripts.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/ComboBox/RadComboBoxScripts.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Input/TextBox/RadInputScript.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Input/NumericTextBox/RadNumericInputScript.js">
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.417/Button/RadButton.js">
<div class="aspNetHidden">
<script type="text/javascript">
<script type="text/javascript">
<div>
<input id="HiddenField_MultyWindowName" type="hidden" name="HiddenField_MultyWindowName">
<table>
<tbody>
<tr>
<td>
<div id="RadAjaxLoadingPanel_QuotaSettings" class="RadAjax RadAjax_Black" style="display:none;">
<div id="Panel_QuotaSettings">
<div id="RadFormDecorator_QuotaSettings" class="RadFormDecorator" style="display:none;">
<table id="Table_QuotaAction">
<tbody>
<tr style="color:Gray;">
<tr>
<td style="white-space: nowrap">
<table>
<tbody>
<tr>
<tr>
<tr>
<td>
<input id="radio_BlockPrinting" class="rfdRealInput" type="radio" onclick="ShowHideQuotaSettings('1');" value="radio_BlockPrinting" name="radio_QuotaAction" _rfddecoratedid="_rfdSkinnedradio_BlockPrinting">
<label id="_rfdSkinnedradio_BlockPrinting" class=" rfdRadioUnchecked" for="radio_BlockPrinting" unselectable="on"> </label>
<span id="Label_BlockPrinting" style="font-size: small;">Block Printing</span>
</td>
</tr>
<tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
申し訳ありませんが、画像を投稿できません。後で試してみます
ところで - 私は要素 id = 'radio_BlockPrinting' を取得しようとしましたが、私が言ったように成功しませんでしたが、id = RadWindowWrapper_ctl00_RadWindow_QuotaSettings で要素を取得しようとしました。 Telerik)、どうすれば id = 'radio_BlockPrinting' を取得できますか? 何か案が?