Hi folks.

I was using the element_by_xpath to try to interact with "FreeTextBox" (FTB). 
FTB is a ASP.NET component that allows users to do some online editing.  
Supposedly there is an interface that I can use to interact with it, and I 
wanted to see if I actually could in my own clumsy way.

I consider FTB to be my nemesis.  I know I can get it to work... just finding 
out the "how".  Its been quite a journey, and I'm getting closer all the time. 

LOL.

Thanks
-Alan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Tuesday, September 19, 2006 8:21 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Problem with element_by_xpath?

Angrez, Do you consider element_by_xpath to be part of the published 
API? I didn't see it that way.

Alan, can you explain why you are using element_by_xpath instead of, 
say, ie.text_field(:xpath, "blah")?

Bret

Alan Ark wrote:
>
> Hi Angrez.
>
> Ahhh.. yes I used the wrong Xpath query. I'll double check that from 
> now on.
>
> One thing that would help me is a unittest that specifically exercises 
> the element_by_xpath call. I didn't find one with the Watir 1081 gem 
> install. Maybe you have one lying around somewhere?
>
> I'm still getting the same error (from original message) with the call 
> on my machine though.
>
> REXML::ParseException.
>
> I ran the unittests for REXML, and they mainly passed. (The ones that 
> failed appear to be missing the test files in the REXML 3.1.5 
> distribution).
>
> I'm going to have to investigate this a little more on my end.
>
> Thanks
>
> -Alan
>
> ------------------------------------------------------------------------
>
> *From:* [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] *On Behalf Of *Angrez Singh
> *Sent:* Monday, September 18, 2006 10:38 PM
> *To:* wtr-general@rubyforge.org
> *Subject:* Re: [Wtr-general] Problem with element_by_xpath?
>
> Hi Alan,
>
> The way you are using XPath query is not the correct way. You can take 
> the help of this tutorial to write correct XPath expression:
> http://www.w3schools.com/xpath/default.asp 
> <http://www.w3schools.com/xpath/default.asp>
>
> In your case the correct XPath expression would be:
> element = ie.element_by_xpath("//[EMAIL PROTECTED]'q']")
>
> First you should use the tag names that are visible on the HTML source 
> and not the tagnames that are supplied by watir. Like you should have 
> used 'input' instead of 'text_field' which is watir specific. Also you 
> should gives quotes(single or double) while giving the selection 
> criteria.
>
> The above code works for me. Let me know if you still have any problems.
>
> - Angrez
>
> On 9/16/06, *Alan Ark* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> 
> wrote:
>
> Hi folks.
>
> I am having a problem getting element_by_xpath to work cleanly.
>
> Windoze XP pro
>
> Ruby 1.8.5 - One click installer.
>
> Watir 1.5.1.1081 - gem install
>
> Rexml 3.1.5
>
> I've attached by browser to google.com <http://google.com> .
>
> From irb :
>
> elem=ie.element_by_xpath("//[EMAIL PROTECTED]")
>
> returns
>
> REXML::ParseException: #<Iconv::IllegalSequence: "\n< <SNIP>....
>
> ...
>
> </SNIP>
>
> Line:
>
> Position:
>
> Last 80 unconsumed characters:
>
> <HTML> <body text="#000000" vLink="#551a8b" aLink="#ff0000" 
> link="#0000cc" bgCo
>
> from c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:89:in 
> `parse'
>
> from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:190:in `build'
>
> from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:45:in `initialize'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in `new'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in 
> `create_rexml_document_object'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1972:in 
> `rexml_document_object'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2174:in 
> `elements_by_xpath'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2167:in 
> `element_by_xpath'
>
> Should I try a different Watir gem version? Other suggestions?
>
> Thanks
>
> -Alan
>
> ------------------------------------------------------------------------
>
> *Alan Ark* * |* **Lead QA Engineer ****|** ** ComplĂ­** ** | **** 
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ****|** **office:**** ** 
> 503.294.2020 *|* * fax:* 503.294.1200 **|** www.compli.co m 
> <http://www.compli.com/>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.4/448 - Release Date: 9/14/2006
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org <mailto:Wtr-general@rubyforge.org>
> http://rubyforge.org/mailman/listinfo/wtr-general
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 9/15/2006
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/451 - Release Date: 9/19/2006
 
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to