Softwarer
unread,Oct 29, 2011, 3:45:42 PM10/29/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Selenium Users
Did anybody succeed in closing extjs' tab sheet via Selenium?
I have a tab panel:
var panTabs = new Ext.TabPanel({
region: 'center',
id: 'main-form-page-control',
border: false,
activeTab: 0,
tabWidth: 150,
resizeTabs: true,
items: [panResult]});
with a tab sheet on it:
Ext.apply(editCard, {closable: true, border: true, id: card_id});
...
this.panTabs.add(editCard).show();
I'm trying to automate it:
panEdit = findElement(panTabs, By.metaID("card-%d-new-record",
dicName), "Can't locate edit pane");
assertTrue("Edit pane unavailable", paneEdit.isDisplayed() &&
paneEdit.isEnabled());
....
findElement(paneEdit, ..... some work with edit card
....
WebElement tab = findElement(panTabs, By.metaID("main-form-page-
control__card-%d-new-record", dicName), "Can't locate tab");
WebElement btnClose = findElement(tab, By.className("x-tab-strip-
close"), "Can't locate close button");
btnClose.click();
testResultPaneActive();
It works fine until btnClose.click() which simple do nothing. Html for
close button is:
<ul id="ext-gen51" class="x-tab-strip x-tab-strip-top">
<li id="main-form-page-control__panelPanResult" class="">
....
<li id="main-form-page-control__card-7-new-record" class="x-tab-strip-
closable x-tab-strip-active">
<a id="ext-gen259" class="x-tab-strip-close"></a>
<a id="ext-gen260" class="x-tab-right" href="#">
<em class="x-tab-left">
<span class="x-tab-strip-inner" style="width: 121px;">
<span class="x-tab-strip-text ">New Record</span>
</span>
</em>
</a>
</li>
<li id="ext-gen52" class="x-tab-edge">
<div id="ext-gen53" class="x-clear"></div>
</ul>
a.x-tab-strip-close {
background-image: url("../images/default/tabs/tab-close.gif");
}
I'm pretty sure that I need to click at x-tab-strip-close cell (a
small image really) but I have no idea how to do it - it looks like
Selenium treats element as non-clickable.