On 03/14/2011 07:24 PM, Dmitriy Igrishin wrote:
> Indeed, WMenuItem was not designed as widget. And you are right,
> itemWidget() is a widget that represents an item (label).
> I don't completely understand what sub-element can't be accessed
> by Selenium. Have you set id for WMenu of WMenuItem (which can be
> accessed by WMenuItem::menu()) ?
I tried to access every exported element by WMenuItem, but it's still
not sufficient.
Source code:
Wt::WMenuItem* myItem =
theTabSelector->addTab(theTab, "MyTab");
myItem->menu()->setId("myItem->menu()");
myItem->itemWidget()->setId("myItem->itemWidget()");
What chrome or firefox inspectors see:
<ul id="myItem->menu()">
<li id="ouycarw"><span class="itemselected" id="myItem->itemWidget()">
<a onclick="var e=event||window.event,o=this;
if(e.ctrlKey||e.metaKey)return true;
else{Wt._p_.update(o,'s3d1',e,true);
Wt3_1_8.cancelEvent(e,0x2);}" href="#" id="ouycary">
<span style="white-space: nowrap;" id="ouycarz">MyTab</span>
</a></span>
</li>
A click on the tab is seen by selenium as a click on element with id
ouycarz: I can't access that element.
--
Antonio Mancina
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest