Have you tried to use the IE Developer Toolbar to figure out what the
element IDs are?  Keep the overlay window open and click around to
determine how to access what you need.

On Nov 23, 9:00 am, Ethan <notet...@gmail.com> wrote:
> It would appear that watir can't find a window with a title that matches
> /Select Products/. your html snippet has no mention of any title, so I don't
> know if such a window exists. If that is the title of an html overlay popup,
> it is not a real IE window and watir won't be able to find a real IE window
> with that title.
>
>
>
> On Mon, Nov 23, 2009 at 11:37, Soori <sure...@gmail.com> wrote:
>
> > Hi Ethan,
>
> > This is the simple ruby script which am trying,
>
> >   $ie=Watir::IE.new
> >   $ie.goto("http://localhost/myurl";)
> >    i=1
> >    $ie.select_list(:name,
> > "tx#local#Xssproduct#Source#category").select("HA")
> >    $ie.text_field(:name, "addNewProductInput").set("product"+i.to_s)
> >    $ie.image(:src, /add.gif/).click
> >    $ie.text_field(:name, "tx#local#Xssproduct#Source#productId").set
> > ("PI"+ts.to_s)
> >    $ie.text_field(:name,
> > "tx#local#Xssproduct#Source#productTitle").set("PT"+ts.to_s)
> >    $ie.link(:text, "Add").click #Opens a pop up to search the product
>
> > #-----Start of Overlay Po pup-----------#
> >    $ie2 = Watir::IE.attach(:title, /Select Products/)
> >    $ie2.button(:name, "Button").click
> >    $ie2.link(:text=>"Select",:value=>"Test prd 1").click
> > #-----End of Overlay Po pup-----------#
>
> > Error received:
> > -----------------------
> > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
> > 300:in `attach_browser_window': Unable to locate a window with title
> > of (?-mix:Select Products)
> > (Watir::Exception::NoMatchingWindowFoundException)
>
> > Hope this will help.
>
> > /Soori
>
> > On Nov 23, 8:36 pm, Ethan <notet...@gmail.com> wrote:
> > > Please include the ruby code that you are trying to use, the error that
> > you
> > > are getting, what version of watir you are using.
> > > Before posting, please readhttp://
> > wiki.openqa.org/display/WTR/Supportparticularly"General
> > > Posting Guidelines".
>
> > > -Ethan
>
> > > On Mon, Nov 23, 2009 at 06:43, Soori <sure...@gmail.com> wrote:
>
> > > > Hi Angrez,
>
> > > > We are using the  "DHTML Window Widget- By Dynamic Drive, available
> > > > at:http://www.dynamicdrive.com"; for overlay popup.
>
> > > > Please find below the htm of the popup and let me know if you need
> > > > more info,
>
> > > > --------------------------------------------------------
> > > > <tbody><tr>
> > > > <td style="padding: 0px;">
> > > > <div class="heading">
> > > > <table style="" border="0" cellpadding="0" cellspacing="0">
> > > > <tbody><tr>
> > > > <td nowrap="true">
> > > > <h1>Xss Product Search</h1>
> > > > </td><td nowrap="true">
> > > > <div style="" class="heading-right"></div>
> > > > </td>
> > > > </tr>
> > > > </tbody></table>
> > > > </div>
> > > > </td>
> > > > </tr>
>
> > > > <tr>
> > > > <td align="center" valign="top">
> > > > <form action="search.do" method="POST" onsubmit="clickSubmitOnSubmit
> > > > (this);">
> > > > <input name="zTaskId" value="p1" type="hidden"><input
> > > > name="zComponentId" value="105" type="hidden"><input
> > > > name="zComponentName" value="Coach"
>
> > > > type="hidden"><input name="zWorkflowState" value="3"
> > > > type="hidden"><input name="zDbg" value="0" type="hidden"><input
> > > > name="zButtonName" value="Button0"
>
> > > > type="hidden"><input name="zActType" value="CoachDesigner"
> > > > type="hidden"><input name="applicationInstanceId" value="undefined"
> > > > type="hidden"><input
>
> > > > name="applicationId" value="1" type="hidden">
> > > > <table class="layout  twLayout " id="section" cellpadding="0"
> > > > cellspacing="0">
> > > > <tbody><tr class="layoutBody twLayoutBody">
> > > > <td class="layoutBodyLeft">&nbsp;</td><td class="layoutBodyCenter">
> > > > <div class="sectionBody twSectionBody" id="section_controls">
> > > > <table class="controlLayout">
> > > > <tbody><tr class="twControlTR" id="section_Row0">
> > > > <td class="sectionBodyCenterControl twControlTD " rowspan="1"
> > > > colspan="2" valign="top">
> > > > <div class="customHTML" id="CustomHTML1"><script type="text/
> > > > javascript" src="/Xss-util/filter/js/external/mootools.js"></script>
> > > > <script type="text/javascript" src="/Xss-util/filter/js/demo-js/
> > > > table.js"></script>
> > > > <script type="text/javascript" src="/Xss-util/filter/js/dg-
> > > > filter.js"></script></div>
>
> > > > </td>
> > > > </tr>
> > > > <tr class="twControlTR" id="section_Row0">
> > > > <td class="sectionBodyCenterControl twControlTD " rowspan="1"
> > > > colspan="2" valign="top">
> > > > <div class="customHTML" id="CustomHTML0"><script>
> > > > function setValue(key)
> > > > {
> > > > document.getElementById("selectedKey1").value = key;
> > > > parent.emailwindow.hide();
> > > > }
> > > > </script>
> > > > <input name="selectedKey1" id="selectedKey1" value="" type="hidden">
> > > > <table cellpadding="0">
> > > >        <tbody><tr>
> > > >                <td>Search: <input id="tw#local#searchKey"
> > > > name="tw#local#searchKey"
> > > > type="text"><input name="Button" value="Find"
>
> > > > onclick="document.getElementById('ButtonGroup0_Button0').click();
> > > > return false;" type="button"></td>
> > > >                <td align="left"></td>
> > > >        </tr>
>
> > > > </tbody></table>
> > > > </div>
> > > > </td>
> > > > </tr>
> > > > <tr class="twControlTR" id="section_Row0">
> > > > <td class="sectionBodyCenterControl twControlTD " rowspan="1"
> > > > colspan="2" valign="top">
> > > > <div style="display: none;" class="buttonGroup twControl
> > > > twButtonGroup" id="ButtonGroup0" align="right">
> > > > <button class="layoutButton twButton" type="submit"
> > > > id="ButtonGroup0_Button0" name="ButtonGroup0#Button0" onclick="if
> > > > (isFormSubmitted(this, true)) { return
>
> > > > false; } else { return true; }">Search</button>
> > > > </div>
> > > > <script type="text/javascript">var result = '';
>
> > > >   if (result == '') { result = 'NONE'; }
> > > >  var element = document.getElementById('ButtonGroup0');
> > > >  element.defaultVisibility = result;
> > > >  setVisibilityNoRecursivity(element, result);
> > > > </script></td>
> > > > </tr>
> > > > </tbody></table>
> > > > </div>
> > > > </td><td class="layoutBodyRight">&nbsp;</td>
>
> > > > </tr>
> > > > <tr class="layoutFooter twLayoutFooter">
> > > > <td class="layoutFooterLeft">&nbsp;</td><td
> > > > class="layoutFooterCenter">&nbsp;</td><td
> > > > class="layoutFooterRight">&nbsp;</td>
> > > > </tr>
> > > > </tbody></table>
> > > > </form>
> > > > <div id="coachErrorMsg"></div>
> > > > </td>
> > > > </tr>
> > > > </tbody>
> > > > -----------------------------------------
>
> > > > /Soori
>
> > > > On Nov 23, 3:41 pm, Angrez Singh <ang...@gmail.com> wrote:
> > > > > Hi Soori,
>
> > > > > Think if somebody has posted the same question, will you be able to
> > help
> > > > him
> > > > > without knowing what he had tried, what ruby code he's using, whats
> > the
> > > > HTML
> > > > > of the page, whats the HTML of the pop up? This will be information
> > that
> > > > > you'll require to help some one else.
>
> > > > > So everybody on the list are willing to help for each/every problem
> > that
> > > > you
> > > > > face provided they get enough information.
>
> > > > > Thanks,
> > > > > Angrez
>
> > > > > On Mon, Nov 23, 2009 at 3:52 PM, Soori <sure...@gmail.com> wrote:
>
> > > > > > All,
>
> > > > > > I would like to add a product on cart through search option.
> > clicking
> > > > > > Add link on the page will open an overlay popup where we can search
> > a
> > > > > > product and click Add button from the search result.
>
> > > > > > I couldn't access the search button and the search text box on the
> > > > > > overlay pop up. please help me in this front.
>
> > > > > > Thanks in advance.
>
> > > > > > /Soori
--~--~---------~--~----~------------~-------~--~----~
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