ahhhh yes. i just relaised that in a previous test i had done it the
small minor mistake on my behalf. thanks again for the speedy reply
P.s. Only posted to one group this time...
On Nov 9, 4:19 pm, Jari Bakken <
jari.bak...@gmail.com> wrote:
> Don't use element_by_xpath. If you want a text field, pass the xpath
> to Browser#text_field:
>
> browser.text_field(:xpath, "/your/xpath").set("foo")
>
> Again, reading the docs would show you on what elements the #set
> method is defined (e.g. not on Watir::Input).
>
>
>
> On Tue, Nov 9, 2010 at 5:04 PM, Usman Hussain <
usmanhhuss...@gmail.com> wrote:
> > Hi Guys,
>
> > I am trying to set a text field with the method set and it doesnt seem
> > to be working anymore.
>
> > The error im getting is: `set' for #<Watir::Input:0x102204a38>
> > (NoMethodError)
>
> > I am using Watir-WebDriver (version 0.1.1) and firefox as the browser.
>
> > My line of code is:
> > @browser.element_by_xpath("//div[@id= 'container']//div//input[@value=
> > 'starofjoy.display']/../input[2]").set("true")
>
> > If I use send_keys instead of set then i end up with the text field
> > looking something like this:
> > falsetrue
>
> > BUT all i want is to change it from False to True...
>
> > has anyone else come across this problem?
>
> > Kind regards,
> > Usman Hussain
>
> > --
. In short: search before you ask, be nice.