Cool. So you need to access the frame first and then the text field ;) On 18 August 2011 17:03, Mitchell Presar <[email protected]> wrote:
> Yeah, it was in a frame. That was the problem. Thanks. > > On Aug 18, 11:56 am, Rahul Sharma <[email protected]> wrote: > > Please paste the full HTML. IS the textfield inside a frame? > > > > On 18 August 2011 16:54, Mitchell Presar <[email protected]> wrote: > > > > > > > > > > > > > > > > > > > > > returns false > > > > > I would post the rest of the html, but there are too many lines in it. > > > > > But there is a form its in with name, action, and method > > > it is within a table with no name > > > in a div with id = portletgrp > > > and in a table class = "findClientPortletContentHeader" > > > > > On Aug 18, 11:48 am, Rahul Sharma <[email protected]> wrote: > > > > Can you try in irb browser.text_field(:id => > > > ''searchByElelastName").exists? > > > > and see whether it returns true or false? > > > > > > On 18 August 2011 16:45, Mitchell Presar <[email protected]> > wrote: > > > > > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > > > using {:name=>"finderCriteria.lastName"} > > > > > from > C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.7.1/lib/watir/ > > > > > element.rb:58:in `assert_exists' > > > > > from > C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.7.1/lib/watir/ > > > > > input_elements.rb:366:in `set' > > > > > from (irb):28 > > > > > from C:/Ruby192/bin/irb:12:in `<main>' > > > > > > > On Aug 18, 11:41 am, Rahul Sharma <[email protected]> > wrote: > > > > > > Can you paste the full error? > > > > > > > > On 18 August 2011 16:38, Mitchell Presar <[email protected]> > > > wrote: > > > > > > > > > Same error. > > > > > > > > > Unable to locate element using {:name => > "finderCriteria.lastName"} > > > > > > > > > On Aug 18, 11:33 am, Rahul Sharma <[email protected]> > > > wrote: > > > > > > > > Can you try by :name and see if it returns the same error? > > > > > > > > > > On 18 August 2011 16:23, Mitchell Presar < > [email protected]> > > > > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > I've been using Watir for about a day now and having > trouble > > > > > accessing > > > > > > > > > a text field that is within a table. > > > > > > > > > > > I tried to access it by this: > > > > > > > > > > > browser.text_field(:id => 'searchByElelastName').set > "Stuff" > > > > > > > > > > > returns that it is unable to locate element. > > > > > > > > > > > This is the html for the element I want to access. > > > > > > > > > > > <input type="text" name="finderCriteria.lastName" > > > maxlength="25" > > > > > > > > > value="" style="width:160px;" class="regtxtfield" > > > > > > > > > id="searchByElelastName"> > > > > > > > > > > > Any suggestions? > > > > > > > > > > > -- > > > > > > > > > Before posting, please readhttp://watir.com/support. In > short: > > > > > search > > > > > > > > > before you ask, be nice. > > > > > > > > > > > [email protected] > > > > > > > > >http://groups.google.com/group/watir-general > > > > > > > > > [email protected] > > > > > > > > > > -- > > > > > > > > Regards, > > > > > > > > > > Rahul Sharma > > > > > > > > Ph:+44 7800 736851 > > > > > > > > > -- > > > > > > > Before posting, please readhttp://watir.com/support. In short: > > > search > > > > > > > before you ask, be nice. > > > > > > > > > [email protected] > > > > > > >http://groups.google.com/group/watir-general > > > > > > > [email protected] > > > > > > > > -- > > > > > > Regards, > > > > > > > > Rahul Sharma > > > > > > Ph:+44 7800 736851 > > > > > > > -- > > > > > Before posting, please readhttp://watir.com/support. In short: > search > > > > > before you ask, be nice. > > > > > > > [email protected] > > > > >http://groups.google.com/group/watir-general > > > > > [email protected] > > > > > > -- > > > > Regards, > > > > > > Rahul Sharma > > > > Ph:+44 7800 736851 > > > > > -- > > > Before posting, please readhttp://watir.com/support. In short: search > > > before you ask, be nice. > > > > > [email protected] > > >http://groups.google.com/group/watir-general > > > [email protected] > > > > -- > > Regards, > > > > Rahul Sharma > > Ph:+44 7800 736851 > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > [email protected] > http://groups.google.com/group/watir-general > [email protected] > -- Regards, Rahul Sharma Ph:+44 7800 736851 -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
