This is the err I get

C:\work>ruby tmp.rb
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.9/lib/watir-webdriver/locators/element_locator.rb:242:in
`assert_valid_as_attribute':
 invalid attribute: :name
(Watir::Exception::MissingWayOfFindingObjectException)
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.9/lib/watir-webdriver/locators/element_locator.rb:223:in
`normalize_sele
ctor'
        from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.9/lib/watir-webdriver/locators/element_locator.rb:202:in
`block in norma
lized_selector'

On Mon, Oct 20, 2014 at 3:13 PM, c w <cristina.wa...@gmail.com> wrote:

> Hi,
>
> please can one advise me on what I am doing wrong.
>
> I try to click on any header elements[I want to select one for instance].
> I have asked the dev to add for me name= “header2” for instance for span
>
> But it looks like it doesn’t work. Can we click spans using the name?
>
> This is a screen snapshot:
>
>
> https://s3.amazonaws.com/uploads.hipchat.com/54839/774688/efrYkROYGYSqfk6/upload.png
>
> This is the quick source code:
>
> require 'watir-webdriver'
> b = Watir::Browser.new
>
> b.goto "
> http://dev-next-app01.vfmltech.com/cube/dms-angular/src/public/vizlly/#/components
> "
> sleep 1
> d = b.driver
> d.switch_to.frame "uiTinymce0_ifr"
>
> d.switch_to.active_element.send_keys [:control, "a"], :backspace
> d.switch_to.active_element.click
> d.switch_to.active_element.send_keys("Hello Testing RTE is
> fun.................!")
> sleep 6
>
> #-----------------------------------------------------------------------------
> # click editor's 'bullist' button
> d.switch_to.active_element.send_keys [:control, "a"]
> b.button(:name => 'format').click
> sleep 6
>
>
> b.span(:name => 'header2').click
>
> I have try using index as well.
>
>
> #b.span(:index , 2).click
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to