Watir question regarding Span

I have the following error while I was running the watir scripts.

when I run the line given below


It throws the following error

can’t convert String into Hash
merge' from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-classic-3.0.0/lib/watir-classic/supported_elements.rb:36:informat_specifiers’
from (eval):3:in `span’

Can You please suggest me what kind of error is this?


The message literally says that “You are passing a String when it’s
expected to receive a Hash”.

What is CLI-ID[{#i}] ?

How is the span html line?

Something like:

Text under span


If so, you should call it like
v_actual = $browser.span(:id => “CLI-ID[#{i}]”).text

Tip: https://github.com/watir/watir/wiki/Cheat-Sheet

Abinoam Jr.

hi Abinoam Jr.,

Thank you.

You’re welcome!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs