Re: [wtr-general] Error displayed in accessing open office spread sheet

2010-03-11 Thread Mrunal

Hi Ayyappa,

Please try this code.

require 'win32ole'
require 'rubygems'

def make_property_value(name,value)
  
   service_manager = WIN32OLE.new("com.sun.star.ServiceManager")
   struct = 
service_manager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")

   struct.Name = name
   struct.Value = value
   return struct

end

noArgs = []
file_uri = "file:///D:/ruby/example.ods"

serviceManager = WIN32OLE.new("com.sun.star.serviceManager")
coreReflection 
=serviceManager.createInstance("com.sun.star.reflection.CoreReflection")

desktop = serviceManager.createInstance("com.sun.star.frame.Desktop")
arg = [make_property_value("Hidden", 
true),make_property_value("Overwrite",true)]

   Process.gid
spreadsheet = desktop.loadComponentFromURL("private:factory/scalc", 
"_blank", 0, noArgs)

 spreadsheet.storeAsURL(file_uri,arg)
   spreadsheet.store
#~ spreadsheet = desktop.loadComponentFromURL(file_uri , "_blank", 0,noArgs)
sheetsCollection = spreadsheet.Sheets
sheet1 = sheetsCollection.getByIndex(0)
cellA1Formula = sheet1.getCellByPosition(0, 0).Formula # Gets text or 
number or whatever is in the cell
cellA1NumericValue = sheet1.getCellByPosition(0, 0).Value # Gets 
numericalvalue of the cell

cell1A = sheet1.getCellByPosition(0, 0) # Gets cell 1A
cell1A.Formula = "Nathan Lane" # Sets the formula for cell 1A to 
"NathanLane"


Regards,
Mrunal




ayyappa wrote:

I am trying to access the open office spreadsheet, using below script
but following error is displayed.kindly can any one help me to over
come. Thanks in advance
require 'win32ole'
require 'rubygems'


noArgs = []
file_uri = "file:///D:/ruby/example.ods"

serviceManager = WIN32OLE.new("com.sun.star.serviceManager")
coreReflection =
serviceManager.createInstance("com.sun.star.reflection.CoreReflection")
desktop = serviceManager.createInstance("com.sun.star.frame.Desktop")
#spreadsheet = stardesktop.loadComponentFromURL("private:factory/
scalc", "_blank", 0, noArgs)
spreadsheet = desktop.loadComponentFromURL(file_uri , "_blank", 0,
noArgs)
sheetsCollection = spreadsheet.Sheets
sheet1 = sheetsCollection.getByIndex(0)
cellA1Formula = sheet1.getCellByPosition(0, 0).Formula # Gets text or
number or whatever is in the cell
cellA1NumericValue = sheet1.getCellByPosition(0, 0).Value # Gets
numericalvalue of the cell
cell1A = sheet1.getCellByPosition(0, 0) # Gets cell 1A
cell1A.Formula = "Nathan Lane" # Sets the formula for cell 1A to
"NathanLane"

Output :

excel.rb:12:in `method_missing': loadComponentFromURL
(WIN32OLERuntimeError)
OLE error code:1001 in [automation bridge]
  com.sun.star.lang.IllegalArgumentException: URL seems to be an
unsupported one.
HRESULT error code:0x80020009
  Exception occurred.   from excel.rb:12
  

Exit code: 1



  


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


Re: [wtr-general] Same word different places on the page.

2010-03-11 Thread Mrunal

Hi Shlomit,

href property might be different.Try using href property.

Reagrds,
Mrunal




Shlomit Gazit wrote:

I need to look for the word 'Share' in related to different texts in
different places in the page, but the link has the same properties.
How can I distinguish. Any ideas?

  


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


Re: [wtr-general] how to execute javascript in safariwatir

2010-03-11 Thread Yuping Zhong
Hi,

Right now,the Safariwatir is not perfect yet,some codes that can run in IE
don't work in Mac.
If your code cannot be executed in Safariwatir,I recommend you feedback this
to the developer.

Thanks!

-Zhong

On Fri, Mar 12, 2010 at 1:52 AM, JonathanKohl wrote:

> I use this with IE, and I was wondering if there is an equivalent in
> SafariWatir:
>
> browser.ie.Document.parentWindow.execScript("sendCommand('#{command}',
> '#{msg}');")
>
> Thanks,
>
> -Jonathan
>
> --
> 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
>

-- 
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: Same word different places on the page.

2010-03-11 Thread orde
Something like this should work:

browser.link(:index=>0, :text=>"Share").click

Watir uses zero-based indexing (although I think firewatir is
different).  So, the example above would click on the first link where
the text is "Share".

Hope it helps.

On Mar 11, 3:09 pm, Shlomit Gazit  wrote:
> I need to look for the word 'Share' in related to different texts in
> different places in the page, but the link has the same properties.
> How can I distinguish. Any ideas?

-- 
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] Same word different places on the page.

2010-03-11 Thread Shlomit Gazit
I need to look for the word 'Share' in related to different texts in
different places in the page, but the link has the same properties.
How can I distinguish. Any ideas?

-- 
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] ruby.exe processes

2010-03-11 Thread Shlomit Gazit
I have lots of ruby.exe processes running after running watir test on
CI server.
Why there creating and how should I kill them after the test is
finished?

-- 
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] how to execute javascript in safariwatir

2010-03-11 Thread JonathanKohl
I use this with IE, and I was wondering if there is an equivalent in
SafariWatir:

browser.ie.Document.parentWindow.execScript("sendCommand('#{command}',
'#{msg}');")

Thanks,

-Jonathan

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


Re: [wtr-general] Error displayed in accessing open office spread sheet

2010-03-11 Thread Felipe Knorr Kuhn
Use the roo or odf libraries to handle Open Office files.

http://roo.rubyforge.org/
http://rubyforge.org/projects/rubyodf/

On Thu, Mar 11, 2010 at 10:23 AM, ayyappa  wrote:

> I am trying to access the open office spreadsheet, using below script
> but following error is displayed.kindly can any one help me to over
> come. Thanks in advance
> require 'win32ole'
> require 'rubygems'
>
>
> noArgs = []
> file_uri = "file:///D:/ruby/example.ods"
>
> serviceManager = WIN32OLE.new("com.sun.star.serviceManager")
> coreReflection =
> serviceManager.createInstance("com.sun.star.reflection.CoreReflection")
> desktop = serviceManager.createInstance("com.sun.star.frame.Desktop")
> #spreadsheet = stardesktop.loadComponentFromURL("private:factory/
> scalc", "_blank", 0, noArgs)
> spreadsheet = desktop.loadComponentFromURL(file_uri , "_blank", 0,
> noArgs)
> sheetsCollection = spreadsheet.Sheets
> sheet1 = sheetsCollection.getByIndex(0)
> cellA1Formula = sheet1.getCellByPosition(0, 0).Formula # Gets text or
> number or whatever is in the cell
> cellA1NumericValue = sheet1.getCellByPosition(0, 0).Value # Gets
> numericalvalue of the cell
> cell1A = sheet1.getCellByPosition(0, 0) # Gets cell 1A
> cell1A.Formula = "Nathan Lane" # Sets the formula for cell 1A to
> "NathanLane"
>
> Output :
> 
> excel.rb:12:in `method_missing': loadComponentFromURL
> (WIN32OLERuntimeError)
>OLE error code:1001 in [automation bridge]
>  com.sun.star.lang.IllegalArgumentException: URL seems to be an
> unsupported one.
>HRESULT error code:0x80020009
>  Exception occurred.   from excel.rb:12
> >Exit code: 1
>
> --
> Before posting, please read http://watir.com/support. To sum it up: search
> before you ask, be nice.
>
> 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
> 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
>

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


Re: [wtr-general] Error displayed in accessing open office spread sheet

2010-03-11 Thread Ethan
This group is for the Watir library. We do not support WIN32OLE or accessing
open office through WIN32OLE.


On Thu, Mar 11, 2010 at 08:23, ayyappa  wrote:

> I am trying to access the open office spreadsheet, using below script
> but following error is displayed.kindly can any one help me to over
> come. Thanks in advance
> require 'win32ole'
> require 'rubygems'
>
>
> noArgs = []
> file_uri = "file:///D:/ruby/example.ods"
>
> serviceManager = WIN32OLE.new("com.sun.star.serviceManager")
> coreReflection =
> serviceManager.createInstance("com.sun.star.reflection.CoreReflection")
> desktop = serviceManager.createInstance("com.sun.star.frame.Desktop")
> #spreadsheet = stardesktop.loadComponentFromURL("private:factory/
> scalc", "_blank", 0, noArgs)
> spreadsheet = desktop.loadComponentFromURL(file_uri , "_blank", 0,
> noArgs)
> sheetsCollection = spreadsheet.Sheets
> sheet1 = sheetsCollection.getByIndex(0)
> cellA1Formula = sheet1.getCellByPosition(0, 0).Formula # Gets text or
> number or whatever is in the cell
> cellA1NumericValue = sheet1.getCellByPosition(0, 0).Value # Gets
> numericalvalue of the cell
> cell1A = sheet1.getCellByPosition(0, 0) # Gets cell 1A
> cell1A.Formula = "Nathan Lane" # Sets the formula for cell 1A to
> "NathanLane"
>
> Output :
> 
> excel.rb:12:in `method_missing': loadComponentFromURL
> (WIN32OLERuntimeError)
>OLE error code:1001 in [automation bridge]
>  com.sun.star.lang.IllegalArgumentException: URL seems to be an
> unsupported one.
>HRESULT error code:0x80020009
>  Exception occurred.   from excel.rb:12
> >Exit code: 1
>
> --
> Before posting, please read http://watir.com/support. To sum it up: search
> before you ask, be nice.
>
> 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
> 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
>

-- 
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] Error displayed in accessing open office spread sheet

2010-03-11 Thread ayyappa
I am trying to access the open office spreadsheet, using below script
but following error is displayed.kindly can any one help me to over
come. Thanks in advance
require 'win32ole'
require 'rubygems'


noArgs = []
file_uri = "file:///D:/ruby/example.ods"

serviceManager = WIN32OLE.new("com.sun.star.serviceManager")
coreReflection =
serviceManager.createInstance("com.sun.star.reflection.CoreReflection")
desktop = serviceManager.createInstance("com.sun.star.frame.Desktop")
#spreadsheet = stardesktop.loadComponentFromURL("private:factory/
scalc", "_blank", 0, noArgs)
spreadsheet = desktop.loadComponentFromURL(file_uri , "_blank", 0,
noArgs)
sheetsCollection = spreadsheet.Sheets
sheet1 = sheetsCollection.getByIndex(0)
cellA1Formula = sheet1.getCellByPosition(0, 0).Formula # Gets text or
number or whatever is in the cell
cellA1NumericValue = sheet1.getCellByPosition(0, 0).Value # Gets
numericalvalue of the cell
cell1A = sheet1.getCellByPosition(0, 0) # Gets cell 1A
cell1A.Formula = "Nathan Lane" # Sets the formula for cell 1A to
"NathanLane"

Output :

excel.rb:12:in `method_missing': loadComponentFromURL
(WIN32OLERuntimeError)
OLE error code:1001 in [automation bridge]
  com.sun.star.lang.IllegalArgumentException: URL seems to be an
unsupported one.
HRESULT error code:0x80020009
  Exception occurred.   from excel.rb:12
>Exit code: 1

-- 
Before posting, please read http://watir.com/support. To sum it up: search 
before you ask, be nice.

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
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] Watij on Watir Podcast

2010-03-11 Thread karim rayani
Hello,

One thing that could be addressed was how to use Watij library with JRuby.
right now with Watir, since it is running on a C port, the chance of
platform change/OS change can cause the script to break at times or
installation problems. Watij as it a Java Port, i guess it would give a
certain amount of reliablity as to write you script on one platform and run
it any where?

Karim Rayani

On Thu, Mar 11, 2010 at 3:37 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> Hi,
>
> I am recording a podcast with Jake Dempsey on Watij (watij.com) this
> Friday. If you have a question or six for Jake, ask.
>
> Željko
> --
> watir.com - community manager
> pledgie.com/campaigns/2982 - donate to Watir
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
>
> --
> 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
>

-- 
Before posting, please read http://watir.com/support. To sum it up: search 
before you ask, be nice.

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
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 access browser objects in Watir ?

2010-03-11 Thread hunzai
Hi,

I want to access browser objects, like navigator.appName.
Is there a way to do it using a single method that works on all
browsers ?


Thanks,

-- 
Before posting, please read http://watir.com/support. To sum it up: search 
before you ask, be nice.

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
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] Watij on Watir Podcast

2010-03-11 Thread Željko Filipin
Hi,

I am recording a podcast with Jake Dempsey on Watij (watij.com) this Friday.
If you have a question or six for Jake, ask.

Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

-- 
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] Frame problem

2010-03-11 Thread Damien
Hi everybody,

I try to test a web application which use many frames. I successfuly
automate some task in the first frame but I can't access to some image
buttons. show_all_objects method doesn't report all objects (?).

I search the "resourcePoolAUTOCOMP" element.

Here is the element HTML code extract with IE Dev Toolbar :

  https://perform.axa-tech.intraxa/itg/web/knta/global/
images/Autocomp.gif" width="20" align="absMiddle" border="0"
name="resourcePoolAUTOCOMP_IMG" /> 

Some code I used :

popup = Watir::IE.attach(:title, /Staffing Profile/)
popup.frame(:name, "positionDialogIF").text_field(:id, /
roleAC_TF/).flash

popup.frame(:name, "positionDialogIF").show_all_objects

---Objects in page -
text/javascript   id= src=
  id= src=
  id= src=/itg/js/common/
MessageController.js
  id= src=/itg/js/common/
HoverSupport.js
  id= src=/itg/js/common/
ImageButton.js
  id= src=/itg/js/common/
ErrorHandler.js
  id= src=/itg/js/common/Validators.js
  id= src=/itg/js/common/
ServerValidator.js
  id= src=/itg/js/common/ComLib.js
  id= src=/itg/js/common/
ComLibXmlHttp.js
  id= src=/itg/js/common/
ComLibIframe.js
  id= src=/itg/js/common/
ErrorHighLightHandler.js
text/css  id=
text/css  id=
  id= src=/itg/web/knta/global/js/
Windoid.js
  id= src=/itg/web/knta/global/js/
CookieUtils.js

  id= src=/itg/web/knta/global/js/en/
Messages.js?VER=600.js
text/css  id=
text/css  id=
text/css  id=
  id= src=/itg/js/rsc/staffing/
StaffingProfileUtils.js
  id= src=/itg/js/common/Tabs.js
  id= src=
hiddenname=contextId  id=
value=position_newPosition39  alt=src=
hiddenname=OBJECT_VERSION_NUMBER  id=
value=  alt=src=
hiddenname=LOAD_PAGE_URL  id= value=%2Fitg
%2Fstaffing%2FEditStaffingProfile.do%3FstaffingProfileId%3D150023%26amp
%3BIS_WINDOID%3DY%26amp%3BIS_WINDOID%3DY  alt=src=
hiddenname=actionName id=actionName
value=createalt=src=
hiddenname=staffingProfileId  id=staffingProfileId
value=150023alt=src=
hiddenname=positionId id=positionId
value=0 alt=src=
hiddenname=periodCalendarId  id=periodCalendarId  value=
alt=src=
hiddenname=effortBucketType  id=effortBucketType  value=2
alt=src=
hiddenname=saveAndClose   id=saveAndClose
value=false alt=src=
hiddenname=synced id=synced
value=true  alt=src=
hiddenname=costCapitalizationEnabled
id=costCapitalizationEnabled
value=true  alt=src=
hiddenname=budgetHasCapitalizedCosts
id=budgetHasCapitalizedCosts
value=false alt=src=
  id= src=/itg/web/knta/global/js/
CompValidation.js
  id= src=/itg/web/knta/global/js/
BrowserDetect.js
  id= src=/itg/web/knta/global/js/
HoverTextSupport.js
  id= src=/itg/web/knta/global/js/
AutoComp.js
HTML Document name=InternalFrame  id=InternalFramesrc=/itg/web/
knta/global/Dummy.jsp
  id= src=
text  name=role   id=roleAC_TF
value=  alt=click mesrc=
  name=   id=
hiddenname=roleHV id=roleAC_TFHV
value=0.0.. alt=src=
  id= src=
hiddenname=existingRoleId  id=
value=  alt=src=
select-onename=resourceType   id=resourceType value=
text  name=positionName   id=positionName
value=  alt=src=
  id= src=
text  name=resourcePool   id=resourcePoolAC_TF  value=
alt=click mesrc=
  name=   id=
hiddenname=resourcePoolHV  id=resourcePoolAC_TFHV
value=0.0..
   alt=src=
  id= src=
text  name=needBy id=needBy
value=  alt=src=
text/css  id=
text/css  id=
text/css  id=
text/css  id=
  id= src=/itg/js/co

Re: [wtr-general] Query regarding chromewatir

2010-03-11 Thread Željko Filipin
On Thu, Mar 11, 2010 at 10:20 AM, Wesley Chen  wrote:
> In fact, it can open the IE window, but it can't access the text field.

I had the same problem when I tried it a while ago. Jari reported the bug.

Ž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


Re: [wtr-general] Query regarding chromewatir

2010-03-11 Thread Wesley Chen
Thank you, Zeljko,
When I use
Watir::IE.new/start to create new IE process, anything goes expected.

Wesley.
For life, the easier, the better.


On Thu, Mar 11, 2010 at 5:20 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Mar 11, 2010 at 10:17 AM, Wesley Chen  wrote:
> > I get error message:
> >
> d:/ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.0.1.dev5/lib/watir-webdriver/base_element.rb:324:in
> `assert_writable': Watir::Exception::ObjectReadOnlyException
> (Watir::Exception::ObjectReadOnlyException)
> > When I change the :internet_explorer to :chrome, anything goes expected.
>
> I think you have found this bug:
>
> http://code.google.com/p/selenium/issues/detail?id=330
>
> Ž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


Re: [wtr-general] Query regarding chromewatir

2010-03-11 Thread Željko Filipin
On Thu, Mar 11, 2010 at 10:17 AM, Wesley Chen  wrote:
> I get error message:
>
d:/ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.0.1.dev5/lib/watir-webdriver/base_element.rb:324:in
`assert_writable': Watir::Exception::ObjectReadOnlyException
(Watir::Exception::ObjectReadOnlyException)
> When I change the :internet_explorer to :chrome, anything goes expected.

I think you have found this bug:

http://code.google.com/p/selenium/issues/detail?id=330

Ž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


Re: [wtr-general] Query regarding chromewatir

2010-03-11 Thread Wesley Chen
In fact, it can open the IE window, but it can't access the text field.

Wesley.
For life, the easier, the better.


On Thu, Mar 11, 2010 at 5:17 PM, Wesley Chen  wrote:

> Hi, Zeljko,
> When I install
>   gem install selenium-webdriver
>   gem install watir-webdriver --pre
> I run the code below:
> *require "watir-webdriver"*
> *browser = Watir::Browser.new(:internet_explorer)*
> *browser.goto("www.google.com")*
> *browser.text_field(:name, "q").set("Hello world")*
> *browser.button(:index, 1).click*
>
> I get error message:
> d:/ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.0.1.dev5/lib/watir-webdriver/base_element.rb:324:in
> `assert_writable': Watir::Exception::ObjectReadOnlyException
> (Watir::Exception::ObjectReadOnlyException)
>
> When I change the *:internet_explorer* to *:chrome*, anything goes
> expected.
>
>
> Wesley.
> For life, the easier, the better.
>
>
> On Thu, Mar 11, 2010 at 5:01 PM, Željko Filipin <
> zeljko.fili...@wa-research.ch> wrote:
>
>> On Wed, Mar 10, 2010 at 11:59 AM, Mrunal  wrote:
>> > I want to test the web applications with google chrome.
>>
>> I am not sure ChromeWatir is in active development any more.
>>
>> Try watir-webdriver, it can drive Chrome:
>>
>> http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/
>>
>> Željko
>> --
>> watir.com - community manager
>> pledgie.com/campaigns/2982 - donate to Watir
>> watirpodcast.com - host
>> testingpodcast.com - audio podcasts on software testing. all of them
>>
>>
>>  --
>> 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] Query regarding chromewatir

2010-03-11 Thread Wesley Chen
Hi, Zeljko,
When I install
gem install selenium-webdriver
gem install watir-webdriver --pre
I run the code below:
*require "watir-webdriver"*
*browser = Watir::Browser.new(:internet_explorer)*
*browser.goto("www.google.com")*
*browser.text_field(:name, "q").set("Hello world")*
*browser.button(:index, 1).click*

I get error message:
d:/ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.0.1.dev5/lib/watir-webdriver/base_element.rb:324:in
`assert_writable': Watir::Exception::ObjectReadOnlyException
(Watir::Exception::ObjectReadOnlyException)

When I change the *:internet_explorer* to *:chrome*, anything goes expected.


Wesley.
For life, the easier, the better.


On Thu, Mar 11, 2010 at 5:01 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Wed, Mar 10, 2010 at 11:59 AM, Mrunal  wrote:
> > I want to test the web applications with google chrome.
>
> I am not sure ChromeWatir is in active development any more.
>
> Try watir-webdriver, it can drive Chrome:
>
> http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/
>
> Željko
> --
> watir.com - community manager
> pledgie.com/campaigns/2982 - donate to Watir
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
>
>
>  --
> 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] Query regarding chromewatir

2010-03-11 Thread Željko Filipin
On Wed, Mar 10, 2010 at 11:59 AM, Mrunal  wrote:
> I want to test the web applications with google chrome.

I am not sure ChromeWatir is in active development any more.

Try watir-webdriver, it can drive Chrome:

http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/

Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

-- 
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] Gmail compose automation

2010-03-11 Thread Željko Filipin
On Wed, Mar 10, 2010 at 12:21 PM, Dilip M  wrote:
> I am automating gmail

Why? I am not kidding. Really, why?

If you are just playing with Watir, Gmail is hard to automate. You can
switch to basic HTML view and it should be trivial then.

Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

-- 
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] Query regarding chromewatir

2010-03-11 Thread Wesley Chen
I use the latest version of chromewatir, I have also met a problem.

When I run the code below:

*require "chrome_watir"**
**$browser = ChromeWatir::Browser.new*
*$browser.goto("**www.google.com* *")*
*$browser.text_field(:name, "q").set "hello world"*
*$browser.button(:index, 1).click*

The script hangs when it turns to "www.google.com", it can't access the text
field.
When I close the browser, it displays the error message as below:

*d:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/chrome_watir/container.rb:348:in
`recv': An existing connection was forcibly closed by the remote host. -
recvfrom(2) (Errno::ECONNRESET)*


Wesley.
For life, the easier, the better.


On Thu, Mar 11, 2010 at 12:06 PM, Mrunal  wrote:

> ory or anyw

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