Hi,
I was able to input data into the readonly field using
ie.text_field(:name , 'date'').value = random_date
"random_date" is a method  which I have used to input random date into the field. But when I submit the data and try to view it in the "View" screen, this date field is blank.
 
 However if  I give  input data as
ie.text_field(:name , 'date'').value = "12/11/2005" ( i.e. directly giving a string instead of taking it from "random_date" method) and then submit , this date will be saved and can be viewed in  the "View" screen.
 
I also tried
date = random_date
ie.text_field(:name , 'date'').value = date.to_s
But still this date was not saved in the "View screen".
 
Is it because I am getting the input dates from a method that it is not being saved?
 
How do I handle this?

Paul Rogers <[EMAIL PROTECTED]> wrote:
Date: Tue, 22 Nov 2005 22:06:53 -0700
From: Paul Rogers <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [Wtr-general] Is there a way to input data into a "Readonly"
text field in watir?

you should be able to use the value= method

using the textfields.html from the watir_bonus\unittests\html dir

ie.text_field(:name , 'readOnly').value='test'

seems to work


Paul
Content-Type: multipart/alternative; boundary="0-1983776644-1132720426=:63063"
Content-Transfer-Encoding: 8bit


--0-1983776644-1132720426=:63063
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,
I want to write a test case in which I am required to test a date field. This date field is a "readonly text field".

The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field).

I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir?
Is there a way to input data into the "Readonly text field" in watir?


---------------------------------
Enjoy this Diwali with Y! India Click here
--0-1983776644-1132720426=:63063
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,
I want to write a test case in which I am required to test a date field. This date field is a "readonly text field".
 
 The input to t! his readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field).
 
I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir?
Is there a way to input data into the "Readonly text field" in watir?



Enjoy this Diwali with Y! India Click here
--0-1983776644-1132720426=:63063--
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


Enjoy this Diwali with Y! India Click here_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


Enjoy this Diwali with Y! India Click here
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to