[wtr-general] Re: Bug in xpath parsing? (Regarding the call in nokogiri)

2010-01-18 Thread Matt Baker
That all sounds good. I'll fork  submit the request when I'm back at
work Tuesday.

Thanks!
-Matt

On Jan 17, 2:38 pm, Charley Baker charley.ba...@gmail.com wrote:
 Hi Matt,

  That's a good point and one that escaped me when I was integrating the
 Nokogiri replacement for REXML. Can you fork watir on github and submit a
 pull request. Let me know if you have problems doing that. For now we should
 limit this to xpath support, as we're trying to keep the various
 implementations in synch and I'm not sure what it might take to have css
 search support in Firewatir or the other drivers.

 -Charley

 On Fri, Jan 15, 2010 at 2:28 PM, Matt Baker mbaker@gmail.com wrote:
  Line 910 of ie-class.rb uses the search method provided by Nokogiri,
  which will search for either a CSS selector or an xpath. It determines
  this via regex, which matches an expression starting with a ( as a
  CSS selector.

  The following example will thus fail:

  When /^I select option ([1-9]+) of ([^\]*)$/ do |idx, field_name|
        �...@browser.radio(:xpath,
  (//inp...@name='#{field_name}'])[position()=#
  {idx}]).click
  end

  It is a valid xpath expression, I'm relying upon those parentheses to
  allow me to refer nodes in the node-set by index.

  My proposal would be to change the following in ie-class.rb...
  doc.search(xpath).each do |element|

  ...to...

  doc.xpath(xpath).each do |element|

  ... which will explicitly look for an xpath. I think this is
  semantically correct since we refer to the how by saying :xpath.
  From an end-user perspective I would expect the corresponding call
  underneath to be explicit.

  If folks need the CSS selectors perhaps we could provide a :css
  option.

  Thoughts?

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Not able to access Dojo controls

2010-01-18 Thread Betsy
Hi Ankur

That didn't work.

Code used:-

require 'watir'
ie=Watir::IE.attach(:title,//)
ie.frame(:index,1).frame(:index,1).text_field(:xpath,//form
[...@id='stockEnq_loadDetails']/inp...@name='input FromDate']).flash
ie.frame(:index,1).frame(:index,1).text_field(:xpath,//form
[...@id='stockEnq_loadDetails']/inp...@name='input FromDate']).set


Error returned:-

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
730:in `locate_input_element': undefined method `element_by_xpath' for
#Watir::Frame:0x336f65c (NoMethodError)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:5:in `locate'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
49:in `assert_exists'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
239:in `flash'
from dojo.rb:8

Kindly suggest another way to work on this control.

Thanks,
Betsy Joy

On Jan 18, 11:29 am, Ankur Gera ankurg...@gmail.com wrote:
 Hi Betsy,
   Try to use the following code and let me know whether it works fine or
 not.

     *
 ie.text_field(:xpath,//fo...@id='stockEnq_loadDetails']/inp...@name='input 
 FromDate']).flash

 ie.text_field(:xpath,//fo...@id='stockEnq_loadDetails']/inp...@name='input 
 FromDate']).set
 xyz
 *
 Thanks  Regards,
 Ankur Gera
 TCS
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Re: Not able to access Dojo controls

2010-01-18 Thread Wesley Chen
I think the code you provided above is not enough.
When I paste the code to my local, open it with my IE, I can't see anything.
Have you got a public website with the html code?

For this kind of location, I think it is not difficult.

Thanks.
Wesley Chen.
For life, the easier, the better.


On Mon, Jan 18, 2010 at 4:43 PM, Betsy joybe...@gmail.com wrote:

 ie.frame(:index,1).frame(:index,1).text_field(:xpath,//form
 [...@id='stockEnq_loadDetails']/inp...@name='input FromDate']).flash

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Re: Not able to access Dojo controls

2010-01-18 Thread Željko Filipin
On Mon, Jan 18, 2010 at 6:16 AM, Betsy joybe...@gmail.com wrote:
 INPUT style=VERTICAL-ALIGN: middle; WIDTH: 7em
 name=inputFromDate __doClobber__ autocomplete=off
 dojoAttachPoint=inputNode value=18/01/2010 / 

This should work (not tested):

browser.text_field(:name = inputFromDate).set text

Željko
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: fire_event not fired in firewatir

2010-01-18 Thread ad
I included this function in the class Element inside the module
FireWatir.

When I debugged my script I see that this function is never called.

Is there any other way around this?



On Jan 16, 4:46 pm, abhinay abhinay.me...@gmail.com wrote:
 Yes there is a bug in firewatir, add this to your code and see if it
 works:

 class FireWatir::Element
   def window_var
     window
   end
 end

 I'm not sure if it's the same issue that I was having but give it a
 shot. I'm going to submit a patch for this problem anyway.

 On Jan 15, 9:05 pm, ad codetest...@gmail.com wrote:

  Hi,
  I am trying to fire an event in firewatir.
  Basically,
  there is a text field. Any key event in the text field, e.g. spacebar,
  enables a button.

  ff.text_field(:id,ok).set xyz doesnt enable the button
  neither does
  ff.text_field(:id,ok).fire_event(onkeypress)

  I modified the element.rb file to send a spacebar keycode when
  fire_event(onkeypress) is fired.
  dom_event_init = initKeyEvent(\keypress\, true, true, #
  {...@container.window_var}, false , false , false , false ,0, 32)

  it does send the spacebar to the text field but the button is not
  enabled.

  Is this a bug in firewatir?

  -ad
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] How to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5

2010-01-18 Thread jnxgn
I cannot figure out how to enter the Chinese characters into the
textfield of a webpage by firewatir 1.6.5, I tried to change the
encoding of the .rb file and the encoding of the firefox browser, but
failed.

require ‘rubygems’
require ‘firewatir’

ff = FireWatir::Firefox.new
ff.goto “http://www.google.com“

sleep 1
ff.text_field(:name, ‘q’).set('电')

For Watir 1.6.5, the Chinese charaters can be supported by replacing
the script WIN32OLE.codepage = WIN32OLE::CP_UTF8 with
WIN32OLE.codepage = WIN32OLE::CP_ACP in the file of C:\Ruby\lib\ruby
\gems\1.8\gems\watir-1.6.5\lib\watir\win32ole.rb
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Pop-up blocking script

2010-01-18 Thread jnxgn
Did you double check it is not a pup but a  login form?


On 18 Jan., 12:45, Chandu80 chandu.she...@gmail.com wrote:
 I have a login function written in ruby  as follows

 def login(link,login,password,g)
     #href_status = href.empty?
     #puts #{href_status}
     dialogue_text ='Connect to ' + link
     p = Watir.autoit.WinWait(dialogue_text,'',30)
     #p = Watir.autoit.WinWait(Connect to 10.130.92.4,'',30)
     puts p = #{p}
     #pop_exists result take in variable
     puts #{dialogue_text}
     putslogin = #{login}
     putspassword = #{password}
     #Execute function only when there is login pop up detected
     if (p==1)
       puts  Begin Login\n
       #Watir.autoit.WinWait(Connect to 10.130.92.4)
       Watir.autoit.WinWait(dialogue_text)
       Watir.autoit.WinActivate(dialogue_text)
       Watir.autoit.Send(login)
       Watir.autoit.Send('{TAB}')
       Watir.autoit.Send(password)
       Watir.autoit.Send('{ENTER}')
       sleep 1
       q = Watir.autoit.WinWait(Windows Internet Explorer,'',10)
       puts q = #{q}
       if(q==1)
         g.jsClick($ie,OK)
       end
     else
       putsLogin not required\n
       sleep 1
       if(q==1)
         g.jsClick($ie,OK)
       end
       #if(href_status == true)
         #g.jsClick($ie,OK)
       #end
     end
     return p
   end
 The dialogue_text denotes the login pop-up and the variable 'p' takes
 in value if the pop-up has appeared or not i.e. whether 1 or 0

 Now when I execute the script that calls this function,the value p is
 shown to be 0 but the login pop-up does appear.So the value of p
 should be 1 and the statements under the if condition should be
 executed.
 Thus the pop-up blocks the script and it doesn't execute further and
 hence autoit fails.

 Kindly suggest what should be done in this case.

 Thanks in advance

 Regards
 Chandrika
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Re: fire_event not fired in firewatir

2010-01-18 Thread Angrez Singh
There is unittest which does the same  it works. Which FireWatir version
are you using?

On Mon, Jan 18, 2010 at 7:14 PM, ad codetest...@gmail.com wrote:

 I included this function in the class Element inside the module
 FireWatir.

 When I debugged my script I see that this function is never called.

 Is there any other way around this?



 On Jan 16, 4:46 pm, abhinay abhinay.me...@gmail.com wrote:
  Yes there is a bug in firewatir, add this to your code and see if it
  works:
 
  class FireWatir::Element
def window_var
  window
end
  end
 
  I'm not sure if it's the same issue that I was having but give it a
  shot. I'm going to submit a patch for this problem anyway.
 
  On Jan 15, 9:05 pm, ad codetest...@gmail.com wrote:
 
   Hi,
   I am trying to fire an event in firewatir.
   Basically,
   there is a text field. Any key event in the text field, e.g. spacebar,
   enables a button.
 
   ff.text_field(:id,ok).set xyz doesnt enable the button
   neither does
   ff.text_field(:id,ok).fire_event(onkeypress)
 
   I modified the element.rb file to send a spacebar keycode when
   fire_event(onkeypress) is fired.
   dom_event_init = initKeyEvent(\keypress\, true, true, #
   {...@container.window_var}, false , false , false , false ,0, 32)
 
   it does send the spacebar to the text field but the button is not
   enabled.
 
   Is this a bug in firewatir?
 
   -ad

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Linux Firefox/JSSH issue

2010-01-18 Thread Aedorn Varanis
Unit tests in watir-webdriver?

On Sun, Jan 17, 2010 at 11:59 PM, Angrez Singh ang...@gmail.com wrote:

 For clicking javascript popup there are methods which does the same. You
 can go ahead and see the unit tests for the same.

 - Angrez


 On Sat, Jan 16, 2010 at 1:40 AM, Aedorn Varanis aed...@gmail.com wrote:

 Is there a way to click javascript popup window buttons? I see no
 click_no_wait command, or a startClicker like in FireWatir. If there's a way
 to do that then I can pretty much just use this driver.

 On Fri, Jan 15, 2010 at 9:57 AM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:

  On Fri, Jan 15, 2010 at 5:18 PM, Aedorn Varanis aed...@gmail.com
 wrote:
  But does this work in Linux and with FireWatir?

 Yes. Since I am not home with Linux, I needed some help from Jari to
 install ruby and rubygems, but watir-webdriver drives Firefox on Ubuntu just
 fine (tried it a minute ago).

 Željko

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general



 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general



 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Re: Bug in xpath parsing? (Regarding the call in nokogiri)

2010-01-18 Thread Charley Baker
Thanks for the submit. My systems are all kind of borked, after having
played around with too many things to get prepped for a conference last
week. Talked to Jari on IRC and got him to pull the request in, so it is in
the current master.

Absolutely appreciate your time on this one.

Cheers,


Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://watir.com
QA Architect, Gap Inc Direct


On Mon, Jan 18, 2010 at 1:08 AM, Matt Baker mbaker@gmail.com wrote:

 That all sounds good. I'll fork  submit the request when I'm back at
 work Tuesday.

 Thanks!
 -Matt

 On Jan 17, 2:38 pm, Charley Baker charley.ba...@gmail.com wrote:
  Hi Matt,
 
   That's a good point and one that escaped me when I was integrating the
  Nokogiri replacement for REXML. Can you fork watir on github and submit a
  pull request. Let me know if you have problems doing that. For now we
 should
  limit this to xpath support, as we're trying to keep the various
  implementations in synch and I'm not sure what it might take to have css
  search support in Firewatir or the other drivers.
 
  -Charley
 
  On Fri, Jan 15, 2010 at 2:28 PM, Matt Baker mbaker@gmail.com
 wrote:
   Line 910 of ie-class.rb uses the search method provided by Nokogiri,
   which will search for either a CSS selector or an xpath. It determines
   this via regex, which matches an expression starting with a ( as a
   CSS selector.
 
   The following example will thus fail:
 
   When /^I select option ([1-9]+) of ([^\]*)$/ do |idx, field_name|
  @browser.radio(:xpath,
   (//inp...@name='#{field_name}'])[position()=#
   {idx}]).click
   end
 
   It is a valid xpath expression, I'm relying upon those parentheses to
   allow me to refer nodes in the node-set by index.
 
   My proposal would be to change the following in ie-class.rb...
   doc.search(xpath).each do |element|
 
   ...to...
 
   doc.xpath(xpath).each do |element|
 
   ... which will explicitly look for an xpath. I think this is
   semantically correct since we refer to the how by saying :xpath.
   From an end-user perspective I would expect the corresponding call
   underneath to be explicit.
 
   If folks need the CSS selectors perhaps we could provide a :css
   option.
 
   Thoughts?
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Watir General group.
   To post to this group, send email to watir-general@googlegroups.com
   Before posting, please read the following guidelines:
  http://wiki.openqa.org/display/WTR/Support
   To unsubscribe from this group, send email to
   watir-general-unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/watir-general

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Error in installation of gem

2010-01-18 Thread aek82
After reading through these posts, I have to say the easiest way to
get WATIR running is by doing the following:

1. Install Ruby via the One Click installer [1.8.??] via
http://www.ruby-lang.org/en/downloads/. After installation go to
prompt and type 'gem update --system'.
2. If you get the error message above [ 'ERROR:  While executing
gem ... (Gem::GemNotFoundException)
Could not find watir ( 0) in any repository ' ], you need to
update your gem package manager to the latest version. Go to
http://rubyforge.org/frs/?group_id=126 and download the latest
version. You can compare your version number by typing 'gem -v' in
command prompt.
3. Unzip the latest gem package manager, open a command prompt in the
directory you extracted to and execute the command 'ruby setup.rb'
4. Now try running 'gem update --system'. It should work. If it
doesn't, then bullocks! If it does, run 'gem install watir'.

'Should' work now. Note, I updated this thread because this is what
comes up in Google's search.

On Dec 29 2009, 10:55 pm, Wesley Chen cjq@gmail.com wrote:
 Watir latest version is 1.6.5. Please don't use Watir1.5.4.

 Thanks.
 Wesley Chen.
 For life, the easier, the better.

 2009/12/30 lu.hr2009 lu.hr2009 lu.hr2...@gmail.com

  thread name can i have it ,thank you.
  watir-1.5.4.gem have  downloaded,it can help me ?

  2009/12/29 Wesley Chen cjq@gmail.com

  It is a different topic, please open a new thread.

  Please see the doc:http://wiki.openqa.org/display/WTR/Installation
  And then try again.

  Thanks.
  Wesley Chen.
  For life, the easier, the better.

  2009/12/29 lu.hr2009 lu.hr2009 lu.hr2...@gmail.com

  hi

  I am trying to install watir in my PC. while I am running the command
  gem update --system or gem install watir
  It always throws following error

  ERROR:  While executing gem ... (OptionParser::AmbiguousOption)
  ambiguous option: -system

  because my company hava domain manager.
  how to resolve it,thank you!

  2009/12/9 chethan sarathy chethan2...@yahoo.co.in

   H

  I All,

  Here is the solution for Ruby Installation  Updating the Gems.

  Pls read this article for more info
 http://rubyforge.org/forum/forum.php?forum_id=35591

  Steps:

 - Find the New Ruby Installer 186-27_rc2.exe. in
 http://rubyforge.org/frs/?group_id=167
 - Install the same (run the command ruby -v some times it throws
 error in that case uninstall  install again).
 - Run gem update (earlier gem update --system doesn't work).
 - Run gem install watir.

 Done.

 This will start running Watir   :)

 Thanks to Shivananda  gemcutter google group for all the help they
 extended.

 Cheers,
 Chethan

  --
  The INTERNET now has a personality. YOURS! See your Yahoo! 
  Homepagehttp://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/.

  --
  You received this message because you are subscribed to the Google
  Groups Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

  --
  善待自己,相信自己,好运常伴自己!

   --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

   --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

  --
  善待自己,相信自己,好运常伴自己!

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support

Re: [wtr-general] How to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5

2010-01-18 Thread Wesley Chen
Try:
$ie.text_field(:name, keyword).value = 你好
I have not replaced anything.

Thanks.
Wesley Chen.
For life, the easier, the better.


On Tue, Jan 19, 2010 at 12:11 AM, jnxgn s...@jnxgn.cn wrote:

 I cannot figure out how to enter the Chinese characters into the
 textfield of a webpage by firewatir 1.6.5, I tried to change the
 encoding of the .rb file and the encoding of the firefox browser, but
 failed.

 require ‘rubygems’
 require ‘firewatir’

 ff = FireWatir::Firefox.new
 ff.goto “http://www.google.com“

 sleep 1
 ff.text_field(:name, ‘q’).set('电')

 For Watir 1.6.5, the Chinese charaters can be supported by replacing
 the script WIN32OLE.codepage = WIN32OLE::CP_UTF8 with
 WIN32OLE.codepage = WIN32OLE::CP_ACP in the file of C:\Ruby\lib\ruby
 \gems\1.8\gems\watir-1.6.5\lib\watir\win32ole.rb

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Linux Firefox/JSSH issue

2010-01-18 Thread Angrez Singh
Not in watir-webdriver but in FireWatir.

On Tue, Jan 19, 2010 at 1:03 AM, Aedorn Varanis aed...@gmail.com wrote:

 Unit tests in watir-webdriver?

 On Sun, Jan 17, 2010 at 11:59 PM, Angrez Singh ang...@gmail.com wrote:

 For clicking javascript popup there are methods which does the same. You
 can go ahead and see the unit tests for the same.

 - Angrez


 On Sat, Jan 16, 2010 at 1:40 AM, Aedorn Varanis aed...@gmail.com wrote:

 Is there a way to click javascript popup window buttons? I see no
 click_no_wait command, or a startClicker like in FireWatir. If there's a way
 to do that then I can pretty much just use this driver.

 On Fri, Jan 15, 2010 at 9:57 AM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:

  On Fri, Jan 15, 2010 at 5:18 PM, Aedorn Varanis aed...@gmail.com
 wrote:
  But does this work in Linux and with FireWatir?

 Yes. Since I am not home with Linux, I needed some help from Jari to
 install ruby and rubygems, but watir-webdriver drives Firefox on Ubuntu 
 just
 fine (tried it a minute ago).

 Željko

 --
 You received this message because you are subscribed to the Google
 Groups Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general



 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general



 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general



 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general