Hi, I tried it but id didn't work. I got following error again. Does it has some specific solution? Because of this I am not able to move forward.
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) from E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:1002:in `text' from manual_publish.rb:202 On Wed, Jun 1, 2011 at 8:48 PM, Angrez Singh <ang...@gmail.com> wrote: > can you try checking a static text inside the div? > something like this: > text.include?("text") > > On Wed, Jun 1, 2011 at 4:19 PM, Amit Bobade <amit.sr...@gmail.com> wrote: > >> 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 <ang...@gmail.com> wrote: >> >>> can you please post the code that you are executing? >>> >>> >>> On Wed, Jun 1, 2011 at 1:05 PM, Gilberto "Velenux" Ficara < >>> g.fic...@gmail.com> wrote: >>> >>>> On 31 Mag, 07:38, Amit Bobade <amit.sr...@gmail.com> 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. >>>> >>>> watir-general@googlegroups.com >>>> http://groups.google.com/group/watir-general >>>> watir-general+unsubscr...@googlegroups.com<http://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com> >>>> >>> >>> -- >>> 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 >>> >> >> >> >> -- >> Thanks and Regards, >> Amit >> >> -- >> 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 >> > > -- > 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 > -- Thanks and Regards, Amit -- 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