[wtr-general] Re: Convert a html file into well formed XML

2011-06-01 Thread Tiffany Fodor
Hi Saurabh!

This group is specifically for Watir and your issue seems to be a
general Ruby question.

If purchasing the chilkat library isn't an option, I'd suggest you
post your question in a Ruby forum.

These are just guesses, but you might also check out nokogiri, rexml
or hpricot.

Good luck!

-Tiffany

On Jun 1, 7:54 am, Saurabh Gupta  wrote:
> Hello,
>
> I am trying to convert an HTML file into XML, and i did that using the
> chilkat selenium which has predefined library for it.
>  link for chilkathttp://www.chilkatsoft.com/ruby.asp.
>
> But the problem it is a trial version and after 30 days it gets locked
> and not able to work on a particular system. SO i need something which
> not required any license to convert a html file into xml.
>
> Please reply as soon as possible, i need it urgently.
>
> Thanks in Advance
> Saurabh Gupta

-- 
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


Re: [wtr-general] Convert a html file into well formed XML

2011-06-01 Thread Željko Filipin
On Wed, Jun 1, 2011 at 3:54 PM, Saurabh Gupta 
wrote:
> I am trying to convert an HTML file into XML

There are xml parsers for ruby, for example:

http://www.rubyinside.com/ruby-xml-performance-benchmarks-1641.html

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host
viaqa.mobi conference on software testing - organizer

-- 
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


[wtr-general] Convert a html file into well formed XML

2011-06-01 Thread Saurabh Gupta
Hello,

I am trying to convert an HTML file into XML, and i did that using the
chilkat selenium which has predefined library for it.
 link for chilkat http://www.chilkatsoft.com/ruby.asp.

But the problem it is a trial version and after 30 days it gets locked
and not able to work on a particular system. SO i need something which
not required any license to convert a html file into xml.

Please reply as soon as possible, i need it urgently.

Thanks in Advance
Saurabh Gupta

-- 
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


Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error

2011-06-01 Thread Angrez Singh
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  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  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  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
>>>
>>
>>  --
>> 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


Re: [wtr-general] Error when Clicking a link using watir

2011-06-01 Thread Željko Filipin
On Wed, Jun 1, 2011 at 1:24 PM, Michael Raj  wrote:
>  ie.link(:xpath,"//a[contains(@href='inloggen.do')]/").click

Please provide link HTML.

In the meantime, try this:

browser.link(:href => /inloggen\.do/).click

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host
viaqa.mobi conference on software testing - organizer

-- 
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


[wtr-general] Error when Clicking a link using watir

2011-06-01 Thread Michael Raj
Hi,

  I am able to open an application through watir. I am checking the
link as
if ie.link(:xpath,"//a[contains(@href='inloggen.do')]/")
if so i am calling
 ie.link(:xpath,"//a[contains(@href='inloggen.do')]/").click

but i am getting error as

C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-class.rb:
465:in `method_missing': unknown property or method
`document' (WIN32OLERuntimeError)
HRESULT error code:0x80010108
  The object invoked has disconnected from its clients.
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-
class.rb:465:in `document'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-
class.rb:719:in `create_xml_parser_doc'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-
class.rb:708:in `xmlparser_document_object'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-
class.rb:922:in `elements_by_xpath'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-
class.rb:915:in `element_by_xpath'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/link.rb:
21:in `locate'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/
element.rb:55:in `assert_exists'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/
element.rb:275:in `click!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/
element.rb:230:in `click'
from APS.rb:16

Kindly help me on this.

Thanks
Peter

-- 
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


Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error

2011-06-01 Thread Amit Bobade
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  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  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
>>
>
>  --
> 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


Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error

2011-06-01 Thread Amit Bobade
Hi Gilberto,

I tried this one. But unfortunately I did not work.

On Wed, Jun 1, 2011 at 1:05 PM, Gilberto "Velenux" Ficara <
g.fic...@gmail.com> wrote:

> On 31 Mag, 07:38, Amit Bobade  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
>



-- 
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


Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error

2011-06-01 Thread Angrez Singh
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  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
>

-- 
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


[wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error

2011-06-01 Thread Gilberto "Velenux" Ficara
On 31 Mag, 07:38, Amit Bobade  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