Re: [wtr-general] Watir Issue with Japanese characters

2012-11-26 Thread Ashok Prabhu
Yay!!  

I have a found a way to make this work. Instead of using the text_field's 
set method directly setting the value to the text_field is working without 
any issues. Please find the working code which was able to enter japanese 
characters in a textbox. I saved the ruby script using the notepad++ editor 
in the UTF-8 without BOM encoding. Hope this helps other Watir users stuck 
like me.

require 'paths.rb'
require 'win32ole' 
require 'watir' 

WIN32OLE.codepage = WIN32OLE::CP_UTF8 #UTF-8 

### 
$Browser = nil 

ENV["watir_browser"]="ie" 

$Browser = Watir::IE.start("www.google.com")

$Browser.text_field(:name,'q').value = "管理者" 
####### 

On Monday, November 26, 2012 11:45:19 AM UTC+5:30, Ashok Prabhu wrote:
>
> Hi Zeljko,
>
> I tried to read the japanese characters from an excel sheet. However it 
> does not seem to work. It showing up boxed characters still in internet 
> explorer text_field.
>
> Thanks,
> ~Ashok.
>
> On Friday, November 23, 2012 9:27:04 PM UTC+5:30, Željko Filipin wrote:
>>
>> On Fri, Nov 23, 2012 at 4:18 PM, Ashok Prabhu  
>> wrote:
>> >  m using ruby 1.8.6 and watir 1.5.1.1230 for my testing. I m trying to
>> > enter some japanese characters into the internet explorer textbox
>> > using watir. However I getting a series of boxed characters instead.
>>
>> Maybe one of these old posts could help you since you are using pretty 
>> old versions of both Ruby and Watir:
>>
>> http://zeljkofilipin.com/enter-non-english-character-in-text-field/
>> http://zeljkofilipin.com/utf-8-and-ruby/
>>
>> Željko
>>
>

-- 
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] Watir Issue with Japanese characters

2012-11-25 Thread Ashok Prabhu
Hi Zeljko,

I tried to read the japanese characters from an excel sheet. However it 
does not seem to work. It showing up boxed characters still in internet 
explorer text_field.

Thanks,
~Ashok.

On Friday, November 23, 2012 9:27:04 PM UTC+5:30, Željko Filipin wrote:
>
> On Fri, Nov 23, 2012 at 4:18 PM, Ashok Prabhu 
> > 
> wrote:
> >  m using ruby 1.8.6 and watir 1.5.1.1230 for my testing. I m trying to
> > enter some japanese characters into the internet explorer textbox
> > using watir. However I getting a series of boxed characters instead.
>
> Maybe one of these old posts could help you since you are using pretty old 
> versions of both Ruby and Watir:
>
> http://zeljkofilipin.com/enter-non-english-character-in-text-field/
> http://zeljkofilipin.com/utf-8-and-ruby/
>
> Željko
>

-- 
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: Watir Issue with Japanese characters

2012-11-23 Thread Ashok Prabhu
This is a legacy setup. I m unsure of the where this version was
downloaded from.

irb(main):003:0> Watir::IE::VERSION
=> "1.5.1.1230"

On Nov 23, 8:35 pm, Željko Filipin  wrote:
> On Fri, Nov 23, 2012 at 4:18 PM, Ashok Prabhu 
> wrote:
>
> >  m using ruby 1.8.6 and watir 1.5.1.1230
>
> Where did you get that version? It is not on the list here:
>
> https://rubygems.org/gems/watir/versions
>
> Željko
> --https://leanpub.com/watirbook

-- 
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] Watir Issue with Japanese characters

2012-11-23 Thread Ashok Prabhu
 m using ruby 1.8.6 and watir 1.5.1.1230 for my testing. I m trying to
enter some japanese characters into the internet explorer textbox
using watir. However I getting a series of boxed characters instead. I
tried writing the japanese characters into a file using ruby and it
works fine. Please find below the snip which explains the problem.
Please help me resolve this problem. I m stuck with this for the past
two days.

require'paths.rb'
require'watir'
require "win32ole"
WIN32OLE.codepage = WIN32OLE::CP_UTF8
$KCODE = 'utf8'
require 'jcode'

strProxyAddress = '管理者'
puts strProxyAddress
open("C:\\test.txt","w").write(strProxyAddress)
i=Watir::IE.attach(:title,/google/i)
i.text_field(:index,2).set(strProxyAddress)

-- 
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] Radio button in a modal dialog

2010-11-09 Thread Ashok Prabhu
I m able to print the id of a radio button. However I could click the
radio button using the set method.


irb::030:0>ie.modal_dialog.table(:index,7).radio(:index,2).id
=> "radLogicalOR"

However this step does not set the radio button.
irb::030:0>ie.modal_dialog.table(:index,7).radio(:index,2).set
=> ""

-- 
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: Could not attach with UAC turned on

2010-10-06 Thread Ashok Prabhu
I tried both the stuff, it didnt work.

On Oct 7, 1:02 am, Ethan  wrote:
> Run ruby as administrator, or turn off "protected mode" in IE.
>
> On Wed, Oct 6, 2010 at 06:28, Ashok Prabhu  wrote:
> > I have been facing the issue of not being able to attach to a ie 8
> > window using the title in windows 2008 with UAC turned on. I m able to
> > attach to the window using title with UAC turned off. Could someone
> > suggest a fix for this without turning off UAC in Windows 2008.
>
> > Thanks,
> > ~Ashok.
>
> > --
> > Before posting, please readhttp://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] Could not attach with UAC turned on

2010-10-06 Thread Ashok Prabhu
I have been facing the issue of not being able to attach to a ie 8
window using the title in windows 2008 with UAC turned on. I m able to
attach to the window using title with UAC turned off. Could someone
suggest a fix for this without turning off UAC in Windows 2008.

Thanks,
~Ashok.

-- 
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] Pointers to docs

2010-09-03 Thread Ashok Prabhu
Hi,

I have been using Watir for sometime now. However I m still unclear
about locating elements in a dom in cases like elements inside nested
tables, nested frames and elements based on the index attribute. Are
there any pointers to any good resources for further reading.


Thanks,
~Ashok.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Issue with modal dialog

2010-09-03 Thread Ashok Prabhu
I m stuck with the following issue in modal dialog.

1. Open a modal dialog 1.
2. Click on a button in the modal dialog 1.
3. Attach to the new modal dialog (modal dialog 2).
4. Do some operations in the modal dialog 2 and click ok (closes the
modal dialog 2).
5. Click on a button in the modal dialog 1-> This step does not
work.

Please let me know how do I click on the button in the modal dialog 1.
I tried to attach to the modal dialog 1 after closing the dialog 2.
However it did not work still.

~Ashok.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Unable to click on a radio button

2010-09-01 Thread Ashok Prabhu
Yes, it is generated by a tool. I did not manually code the radio
button with the attribute.

~Ashok.

On Sep 1, 12:28 pm, Sharma Vishav  wrote:
> I am not sure if udefDisplayViewName is an standard html attribute and
> is supported by watir.
> is this code auto generated through some tool ?
>
> On Wed, Sep 1, 2010 at 6:22 PM, Ashok Prabhu  wrote:
> > I have a radio button with the following attributes. I m able to click
> > on the radio button using the id attribute. However I m unable to
> > click on it using the udefDisplayViewName attribute.
>
> > 
>
> > This is the watir code that is trying to click on it using the
> > udefDisplayViewName.
>
> > ie.modal_dialog.table(:index,1).cell(:index,
> > 5).radio(:udefDisplayViewName, "Data").click
>
> > Please help me out.
>
> > Thanks,
> > ~Ashok.
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search 
> > before you ask, be nice.
>
> > You received this message because you are subscribed 
> > tohttp://groups.google.com/group/watir-general
> > To post: watir-general@googlegroups.com
> > To unsubscribe: watir-general+unsubscr...@googlegroups.com
>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Unable to click on a radio button

2010-09-01 Thread Ashok Prabhu
The script does not show any error. It hangs at the step trying to
click on the radio button. Later it times out after sometime due to a
condition in our script.

On Sep 1, 12:21 pm, Željko Filipin 
wrote:
> On Wed, Sep 1, 2010 at 8:22 AM, Ashok Prabhu  wrote:
> > However I m unable to
> > click on it using the udefDisplayViewName attribute.
>
> And the error message is?
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
> vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Unable to click on a radio button

2010-08-31 Thread Ashok Prabhu
I have a radio button with the following attributes. I m able to click
on the radio button using the id attribute. However I m unable to
click on it using the udefDisplayViewName attribute.



This is the watir code that is trying to click on it using the
udefDisplayViewName.

ie.modal_dialog.table(:index,1).cell(:index,
5).radio(:udefDisplayViewName, "Data").click

Please help me out.

Thanks,
~Ashok.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Find whether a tree has nodes under it

2010-07-20 Thread Ashok Prabhu
I have a web application which has a tree structure. I m using Watir
to automate the application. Sometimes the test case fails where the
tree group is empty (no nodes under it). Hence there is no plus sign
to its left. However the application expects it to have nodes and
fails. How do I find out whether the tree group has nodes under it and
handle it accordingly.

Thanks,
~Ashok.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com