Hi,
  Though we can't enable a particular Tab but we can access the
contents of that Tab using ie-dev-toolbar.
   I was able to successfully upload a file from a tab which wasn't
activated. Below is my code
   $ie.div(:id,"tabContent5").file_field(:name, "theFile").set
("test.txt")
   $ie.div(:id,"tabContent5").button(:class,"formbutton").click


On May 30, 4:12 am, Chuck van der Linden <sqa...@gmail.com> wrote:
> Yeah dealing with stuff like this where it's all dynamically driven,
> events based, and there are many many nested objects on the screen is
> a challenge.   Especially since it looks like the events and other
> things are defined in entirely different areas of the code..
>
> For example at the URL given above, this is what you have to do, to
> get the 'long text' tab to react to mouseover..
>
> browser.li(:id, 'ext-comp-1001__ext-comp-1003').fire_event
> ('onMouseOver')
>
> And lo, when you do that, a bunch of html instantly changes, the page
> is now different slightly, some clases have changed and as a result
> styles change, etc.
>
> but here's the rub..  try to figure out where that action is defined
> that caused it to respond to that event?  (we KNOW it's defined
> somewhere, we just saw it work if you tried that code, the color
> slightly changed, and if you were watching with ie-dev-toolbar you
> could see the class of that thing changed (which changed the color due
> to inheriting fromn CSS)
>
> You can brute force this stuff to some degree, but the problem is,
> unless you have some clue as to what elements are responding to what
> events, you have a ton of stuff to try before you get lucky and find
> out what's going on.
>
> If it was me that had to do this, I'd post a message in one of their
> forums <http://extjs.com/forum/> and see if anyone as succesfully
> automated tests against their tabs, and ask how it was done.   Maybe
> get some clues as to what needs to happen.  since I've tried a LOT of
> stuff just now to automate a simple tab selection on their site and
> failed utterly.  conversely the app I test has (non extjs) tabs in it
> like that, and I don't have any problem automating it by simply firing
> 'click' events on the links in the tabs.
>
> On Apr 28, 10:11 am, «°¤§ømåtïçCðrp§ë¤°» <john.bai...@unisys.com>
> wrote:
>
>
>
> > I'm a no0b, when it comes to things like this, but if the tabs exist
> > in frames, then you can use the id to drill down to the section you
> > want.
>
> > i.e.: browser.frame(:id, "tabs").button(:id, "tab1").click
>
> > Using this method, you don't need to explicity call out the "onClick"
> > or "onFire" methods.
> > Given that I can't, currently, view the entire source of the page, I
> > would suggest using something like:
>
> > browser.button(:id, "ext-comp-1002__ext-comp-1006").click
>
> > Granted, I know they aren't buttons; I'm just using sample code to
> > illustrate how you could fire off an event, without explicitly using
> > an assertion to call on the event.
>
> > On Apr 28, 5:06 am, Vishal <bvkon...@gmail.com> wrote:
>
> > > I checked few other discussions on similar issues. But in none of them
> > > there is a solution available.
> > > Is this Issue can't be fixed?
>
> > > On Apr 27, 12:29 pm, Shweta <nagman...@gmail.com> wrote:
>
> > > > Hi
>
> > > > I tried like this,But it does not clicks on tab,I need to click here
> > > > on Selection tab,Can anyone suggest me the solution for this.
>
> > > > ie.cell(:class,"tab).image(:src,"../images/tabBetween.jpg").click
>
> > > > HTML Code:
> > > > <TR>
> > > > <TD NOWRAP STYLE="cursor:hand;" ONCLICK="goToUrl('/
> > > > quoteShellValidationAction.do?dispatch=ShellInfo');"
> > > > CLASS=tabSelected>&nbsp;&nbsp;&nbsp;&nbsp;
> > > > Info&nbsp;&nbsp;&nbsp;&nbsp;</TD>
> > > > <TD><IMG SRC="../images/tabBetween.jpg" BORDER=0></TD>
> > > > <TD NOWRAP STYLE="cursor:hand;" ONCLICK="goToUrl('/
> > > > ShellValidationAction.do?dispatch=CarrierInfo');"
> > > > CLASS=tab>&nbsp;&nbsp;&nbsp;&nbsp;Selection&nbsp;&nbsp;&nbsp;&nbsp;</
> > > > TD>
> > > > <TD><IMG SRC="../images/tabBetween.jpg" BORDER=0></TD>
> > > > <TD NOWRAP STYLE="cursor:hand;" ONCLICK="goToUrl('/
> > > > ShellValidationAction.do?dispatch=ShellCoverageInfo');"
> > > > CLASS=tab>&nbsp;&nbsp;&nbsp;&nbsp;Quote
> > > > Coverage&nbsp;&nbsp;&nbsp;&nbsp;</TD>
> > > > <TD><IMG SRC="../images/tabBetween.jpg" BORDER=0></TD>
> > > > <TD NOWRAP STYLE="cursor:hand;" ONCLICK="goToUrl('/
> > > > ShellValidationAction.do?dispatch=ShellProducerInfo');"
> > > > CLASS=tab>&nbsp;&nbsp;&nbsp;&nbsp;Producer&nbsp;&nbsp;&nbsp;&nbsp;</
> > > > TD>
> > > > <TD width = 99%><IMG SRC="../images/tabBetween.jpg" BORDER=0></TD>
> > > > </TR>
> > > > <TR>
>
> > > > On Apr 27, 12:09 pm, Vishal <bvkon...@gmail.com> wrote:
>
> > > > > I asked the developers, we checked the in 
> > > > > websitehttp://extjs.com/deploy/dev/docs/
> > > > > documents onTabpanel.
> > > > > We think following event is fired
> > > > > i)activate : ( Ext.Panel p )
> > > > > Fires after the Panel has been visually activated. Note that Panels do
> > > > > not directly support being activated, but some...
> > > > > Fires after the Panel has been visually activated. Note that Panels do
> > > > > not directly support being activated, but some Panel subclasses do
> > > > > (like Ext.Window). Panels which are child Components of a TabPanel
> > > > > fire the activate and deactivate events under the control of the
> > > > > TabPanel.
> > > > > Listeners will be called with the following arguments:
>
> > > > >     * p : Ext.Panel
> > > > >       The Panel that has been activated.
>
> > > > > ii)beforetabchange : ( TabPanel this, Panel newTab, Panel currentTab )
> > > > > Fires before the activetabchanges. Handlers can return false to
> > > > > cancel thetabchange.
> > > > > Fires before the activetabchanges. Handlers can return false to
> > > > > cancel thetabchange.
> > > > > Listeners will be called with the following arguments:
>
> > > > >     * this : TabPanel
> > > > >     * newTab : Panel
> > > > >       Thetabbeing activated
> > > > >     * currentTab : Panel
> > > > >       The current activetab
>
> > > > > When we implement this in our code
> > > > > $ie.span(:text ,"Documents").span(:index,1).fire_event("activate")
>
> > > > > I get an exception
> > > > > D:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:257:in
> > > > > `method_m
> > > > > issing': fireEvent (WIN32OLERuntimeError)
> > > > >     OLE error code:80070057 in htmlfile
> > > > >       Invalid argument.
>
> > > > > I guess there is no such Event, thats why I am getting this message.
>
> > > > > Let me know if we test do this in a different way.
> > > > > On Apr 24, 5:55 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
> > > > > wrote:
>
> > > > > > On Fri, Apr 24, 2009 at 14:53, Vishal <bvkon...@gmail.com> wrote:
> > > > > > > Do you have any other suggestions?
>
> > > > > > Ask your developer(s) are they sure that onclick is fired. If the 
> > > > > > answer is
> > > > > > yes, show them how your code can opentabwhen firing that event.
>
> > > > > > Željko- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to