Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to click on checkboxes on a pop-up window which doesn't have name, label
    primarykey
    data
    text
    <p>I am new to Selenium webdriver. I am working on a application in which clicking a button will pop-up a window for creating a new folder. In this pop-up window, we need to fill few input fields, check few boxes and then click on create button for creating a folder. I am trying to click on check-boxes and then click on create. The check-boxes don't have a name, text, label. I tried using the CSS selector, and the following xpath of the element however, non of these are working. When running using the xpath I get an exception error saying "Unable to locate element". </p> <pre class="lang-java prettyprint-override"><code>driver.findElement(By.xpath("//div[9]/div[2]/div/div/span/div/div/div[2]/table/tbody/tr/td[2]/table/tbody/tr/td[2]/input")); </code></pre> <p>Here is the link for the pop-up window check-boxes image</p> <p><a href="http://imageshack.us/f/811/8thi.png/" rel="nofollow">http://imageshack.us/f/811/8thi.png/</a></p> <p>Here is the HTML code</p> <pre class="lang-html prettyprint-override"><code>&lt;html class="x-border-box x-quirks x-viewport"&gt; &lt;head&gt; &lt;body id="ext-gen1020" class="x-body x-gecko x-mac x-layout-fit x-container x-container-default"&gt; &lt;div id="workspace-1010" class="x-container x-fit-item x-container-default x-border-layout-ct" style="margin: 0px; width: 1680px; height: 494px;"&gt; &lt;div id="ext-quicktips-tip" class="x-tip x-layer x-tip-default" style="display: none;"&gt; &lt;div id="ext-gen1562" class="x-mask" style="z-index: 18999; width: 1371px; height: 300px; right: auto; left: 307px; top: 159px; visibility: hidden;"&gt;&lt;/div&gt; &lt;div id="loadmask-1094" class="x-mask-msg x-layer x-mask-msg-default" style="right: auto; left: 947px; top: 293px; z-index: 19001; display: none;"&gt; &lt;div id="ext-gen1660" class="x-css-shadow" role="presentation" style="z-index: 19000; right: auto; left: 584px; top: 110px; width: 512px; height: 277px; box-shadow: 0px 0px 6px rgb(136, 136, 136); display: block;"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245" class="x-window properties-window x-layer x-window-default x-closable x-window-closable x-window-default-closable x-resizable x-window-resizable x-window-default-resizable" tabindex="-1" style="height: 281px; right: auto; left: 584px; top: 106px; width: 512px; z-index: 19001;"&gt; &lt;div id="propertieswindow-1245_header" class="x-window-header x-header x-header-horizontal x-header-draggable x-docked x-unselectable x-window-header-default x-horizontal x-window-header-horizontal x-window-header-default-horizontal x-top x-window-header-top x-window-header-default-top x-docked-top x-window-header-docked-top x-window-header-default-docked-top" style="width: 512px; right: auto; left: -1px; top: -1px;"&gt; &lt;div id="propertieswindow-1245-body" class="x-window-body x-window-body-default x-layout-fit x-closable x-window-body-closable x-window-body-default-closable x-window-body-default x-window-body-default-closable x-resizable x-window-body-resizable x-window-body-default-resizable" style="background-color: white; left: 0px; top: 20px; width: 502px; height: 222px;"&gt; &lt;div id="form-1246" class="x-panel x-fit-item x-window-item x-panel-default" style="padding: 5px; width: 500px; margin: 0px; height: 220px;"&gt; &lt;div id="form-1246-body" class="x-panel-body x-panel-body-default x-panel-body-default x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left" style="width: 490px; left: 0px; top: 0px; height: 210px;"&gt; &lt;span id="form-1246-outerCt" style="display: table; width: 100%; table-layout: fixed;"&gt; &lt;div id="form-1246-innerCt" class="" style="display:table-cell;height:100%;vertical-align:top;"&gt; &lt;table id="textfield-1247" class="x-field x-table-plain x-form-item x-field-default x-anchor-form-item" cellpadding="0" style="table-layout: fixed; width: 490px;"&gt; &lt;table id="textfield-1248" class="x-field x-table-plain x-form-item x-field-default x-anchor-form-item" cellpadding="0" style="table-layout: fixed; width: 490px;"&gt; &lt;table id="textfield-1249" class="x-field x-table-plain x-form-item x-field-default x-anchor-form-item" cellpadding="0" style="table-layout: fixed; width: 490px;"&gt; &lt;div id="panel-1250" class="x-panel x-panel-default" style="width: 490px; height: 119px;"&gt; &lt;div id="panel-1250_header" class="x-panel-header x-header x-header-horizontal x-docked x-unselectable x-panel-header-default x-horizontal x-panel-header-horizontal x-panel-header-default-horizontal x-top x-panel-header-top x-panel-header-default-top x-docked-top x-panel-header-docked-top x-panel-header-default-docked-top" style="width: 490px; right: auto; left: 0px; top: 0px;"&gt; &lt;div id="panel-1250-body" class="x-panel-body x-panel-body-default x-table-layout-ct x-panel-body-default" style="left: 0px; width: 490px; top: 25px; height: 94px;"&gt; &lt;table id="ext-gen1642" class="x-table-layout" cellspacing="0" cellpadding="0" role="presentation"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;tr&gt; &lt;td id="" class="x-table-layout-cell " rowspan="1" colspan="1"&gt; &lt;td id="" class="x-table-layout-cell " rowspan="1" colspan="1"&gt; &lt;table id="checkboxfield-1256" class="x-field x-table-plain x-form-item x-field-default x-table-form-item" cellpadding="0" style="border-width: 0px; table-layout: auto;"&gt; &lt;tbody&gt; &lt;tr id="checkboxfield-1256-inputRow"&gt; &lt;td id="checkboxfield-1256-labelCell" class="x-field-label-cell" width="105" valign="top" halign="right" style="display:none;"&gt; &lt;td id="checkboxfield-1256-bodyEl" class="x-form-item-body x-form-cb-wrap" role="presentation" colspan="3"&gt; &lt;input id="checkboxfield-1256-inputEl" class="x-form-field x-form-checkbox x-form-cb" type="button" hidefocus="true" autocomplete="off" aria-invalid="false"&gt; &lt;/td&gt; &lt;td id="checkboxfield-1256-sideErrorCell" width="17" valign="middle" style="display: none;"&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;td id="" class="x-table-layout-cell " rowspan="1" colspan="1"&gt; &lt;table id="checkboxfield-1257" class="x-field x-table-plain x-form-item x-field-default x-table-form-item" cellpadding="0" style="border-width: 0px; table-layout: auto;"&gt; &lt;tbody&gt; &lt;tr id="checkboxfield-1257-inputRow"&gt; &lt;td id="checkboxfield-1257-labelCell" class="x-field-label-cell" width="105" valign="top" halign="right" style="display:none;"&gt; &lt;td id="checkboxfield-1257-bodyEl" class="x-form-item-body x-form-cb-wrap" role="presentation" colspan="3"&gt; &lt;input id="checkboxfield-1257-inputEl" class="x-form-field x-form-checkbox x-form-cb" type="button" hidefocus="true" autocomplete="off" aria-invalid="false"&gt; &lt;/td&gt; &lt;td id="checkboxfield-1257-sideErrorCell" width="17" valign="middle" style="display: none;"&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;td id="" class="x-table-layout-cell " rowspan="1" colspan="1"&gt; &lt;/tr&gt; &lt;tr&gt; &lt;tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;table id="hiddenfield-1267" class="x-field x-table-plain x-form-item-hidden x-field-default x-anchor-form-item" cellpadding="0" style="table-layout: auto;"&gt; &lt;table id="hiddenfield-1268" class="x-field x-table-plain x-form-item-hidden x-field-default x-anchor-form-item" cellpadding="0" style="table-layout: auto;"&gt; &lt;/div&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="toolbar-1269" class="x-toolbar x-docked x-toolbar-footer x-docked-bottom x-toolbar-docked-bottom x-toolbar-footer-docked-bottom x-box-layout-ct" style="width: 502px; right: auto; left: 4px; top: 246px;"&gt; &lt;div id="toolbar-1269-innerCt" class="x-box-inner " role="presentation" style="width: 496px; height: 22px;"&gt; &lt;div id="toolbar-1269-targetEl" class="x-box-target" style="width: 496px;"&gt; &lt;div id="button-1270" class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon" style="border-width: 1px; right: auto; left: 334px; margin: 0px; top: 0px; width: 75px;"&gt; &lt;div id="button-1270-btnWrap" class="x-btn-wrap" unselectable="on"&gt; &lt;a id="button-1270-btnEl" class="x-btn-button" tabindex="0" unselectable="on" hidefocus="on" role="button"&gt; &lt;span id="button-1270-btnInnerEl" class="x-btn-inner x-btn-inner-center" unselectable="on"&gt;Create&lt;/span&gt; &lt;span id="button-1270-btnIconEl" class="x-btn-icon-el " style="" unselectable="on" role="img"&gt;&lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="button-1271" class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon" style="border-width: 1px; right: auto; left: 415px; margin: 0px; top: 0px; width: 75px;"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="propertieswindow-1245-north-handle" class="x-resizable-handle x-resizable-handle-north x-window-handle x-window-handle-north x-window-handle-north-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-south-handle" class="x-resizable-handle x-resizable-handle-south x-window-handle x-window-handle-south x-window-handle-south-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-east-handle" class="x-resizable-handle x-resizable-handle-east x-window-handle x-window-handle-east x-window-handle-east-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-west-handle" class="x-resizable-handle x-resizable-handle-west x-window-handle x-window-handle-west x-window-handle-west-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-northeast-handle" class="x-resizable-handle x-resizable-handle-northeast x-window-handle x-window-handle-northeast x-window-handle-northeast-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-northwest-handle" class="x-resizable-handle x-resizable-handle-northwest x-window-handle x-window-handle-northwest x-window-handle-northwest-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-southeast-handle" class="x-resizable-handle x-resizable-handle-southeast x-window-handle x-window-handle-southeast x-window-handle-southeast-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;div id="propertieswindow-1245-southwest-handle" class="x-resizable-handle x-resizable-handle-southwest x-window-handle x-window-handle-southwest x-window-handle-southwest-br x-unselectable" unselectable="on"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div id="ext-gen1659" class="x-mask" style="height: 854px; width: 1680px; z-index: 18997; right: auto; left: 0px; top: 0px;"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload