Hi,
My code is as follows. I located element manually instead of using xpath.
Following code works properly for *exists? *But it does not work for
*text.include?("#{variable_name}").
*
**I tried this with *text.include?(variable_name) *too (i.e. removing #{ }
) as Gilberto suggested, but it didn't work.
browser.div(:id, 'published-articles').div(:class,
'top-green-left').div(:class, 'scroll-main-content').div(:class, 'holder
osX').div(:class, 'jScrollPaneContainer').div(:class,
'scroll-pane').div(:class, 'scroll-main-content-set').div(:class,
'scroll-main-content-set-center vertical_repeat').div(:class,
'scroll-main-content-set-center-content').div(:class,
'right-text-top').div(:class,
'scroll-main-content-set-attch-img').div(:class,
'scroll-main-content-set-center-content-bold').*
text.include?("#{variable_name}")*
On Wed, Jun 1, 2011 at 3:49 PM, Angrez Singh <[email protected]> wrote:
> can you please post the code that you are executing?
>
>
> On Wed, Jun 1, 2011 at 1:05 PM, Gilberto "Velenux" Ficara <
> [email protected]> wrote:
>
>> On 31 Mag, 07:38, Amit Bobade <[email protected]> wrote:
>> > Dear All:
>> >
>> > I am getting following error while executing the script. Please provide
>> some
>> > solution.
>> >
>> >
>> E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket
>> .rb:19:in
>> > `js_eval': missing ; before statement (JsshSocket::JSSyntaxError)
>>
>> I had the same error, but it was a bug on my code... I was using
>> something like:
>>
>> browser.div(:class, "/#{variable}/").present?
>>
>> but variable was already a regexp. I changed it back to:
>>
>> browser.div(:class, variable).present?
>>
>> and now it works... I hope it helps :)
>>
>> Gilberto
>>
>> --
>> 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]<http://groups.google.com/group/watir-general%[email protected]>
>>
>
> --
> 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]
>
--
Thanks and Regards,
Amit
--
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]