Re: [Wtr-general] custom attributes

2007-01-29 Thread Prema Arya
Hi Paul, You can use xpath to address the elements having custom attributes. For example, to access the following input tag input type=text name=aa mytag=paul using xpath the code would look like this: inText = ie.text_field(:xpath , //[EMAIL PROTECTED]'paul']/) puts inText Regards, Prema

[Wtr-general] Getting the current system date through a Watir command

2007-01-29 Thread vijay
Hello people, I do not know what command to use to make Watir output the current system date and to convert it into the desired format, dd-mon- (22-Jan-2007). I want the current system date inorder to check whether a particular field present in the application has the currrent date or

[Wtr-general] how to make Watir output the current system date through a command

2007-01-29 Thread vijay
Hello people, I do not know what command to use to make Watir output the current system date and to convert it into the desired format, dd-mon- (22-Jan-2007). I want the current system date inorder to check whether a particular field present in the application has the currrent date or

[Wtr-general] How to click an image button

2007-01-29 Thread ankur
Hi all I am automating test cases for a web application . Can someone please tell me how to click on a button which has its value as a image .The code in Html says img src=images/af/Login_button.jpg looking for an early response..

Re: [Wtr-general] how to make Watir output the current system datethrough a command

2007-01-29 Thread Walter Kruse
Hi Vijay This is a Ruby method, not specific to Watir: Time.now.strftime(%d-%b-%Y) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vijay Sent: 29 January 2007 01:51 PM To: wtr-general@rubyforge.org Subject: [Wtr-general] how to make Watir output the

Re: [Wtr-general] BUG: Using XPath

2007-01-29 Thread Prema Arya
Hi, Please find the attached patch fixing the xpath issue. Regards, Prema On 1/25/07, Bret Pettichord [EMAIL PROTECTED] wrote: On 1/25/07, Prema Arya [EMAIL PROTECTED] wrote: This change should be checked-in in the main branch also, Bret can you give me access right to check-in? or

Re: [Wtr-general] how to make Watir output the current system datethrough a command

2007-01-29 Thread Prema Arya
You can refer this for more date-time formats: http://www.rubycentral.com/book/ref_c_time.html#Time.strftime Prema On 1/29/07, Walter Kruse [EMAIL PROTECTED] wrote: Hi Vijay This is a Ruby method, not specific to Watir: Time.now.strftime(%d-%b-%Y) -Original Message- From: [EMAIL

Re: [Wtr-general] Getting the current system date through a Watir command

2007-01-29 Thread Željko Filipin
On 1/29/07, vijay [EMAIL PROTECTED] wrote: I do not know what command to use to make Watir output the current system date and to convert it into the desired format, dd-mon- (22-Jan-2007). Watir can not do it, but Ruby can. Time.now.strftime(%d-%b-%Y) = 29-Jan-2007 For more information,

Re: [Wtr-general] How to click an image button

2007-01-29 Thread Prema Arya
Hi, This code will click the image with name like Login_button.jpg ie.image(:src, /Login_button.jpg/).click Prema On 1/29/07, ankur [EMAIL PROTECTED] wrote: Hi all I am automating test cases for a web application . Can someone please tell me how to click on a button which has its value

Re: [Wtr-general] Why does Watir sometimes not open an IE window,

2007-01-29 Thread Nathan
Thank you both for your replies, but no I am not using the -b option to make IE run hidden. This occurs sometimes with both IE6 and IE7. It seems to be unclear what causes this mysterious behavior. For example I set up a windows scheduled task to run a batch file that runs one of my watir

Re: [Wtr-general] custom attributes

2007-01-29 Thread Željko Filipin
On 1/29/07, Prema Arya [EMAIL PROTECTED] wrote: ie.text_field(:xpath , //[EMAIL PROTECTED]'paul']/) This is so cool. -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] custom attributes

2007-01-29 Thread Paul Rogers
I really only p[osted this for information to others who want to search the archives. If its something that occurs a lot, it may be possible to add it to watir directly, but Ive never seen these things used. And does firefox support them? Allow you to access them? Paul On 1/29/07, Prema Arya

Re: [Wtr-general] How to click an image button

2007-01-29 Thread Nathan
If your button is actually an image, for example lt;img src=...rt;, then you should click on it using @ie.image(:src, ...).click. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6309messageID=17763#17763

Re: [Wtr-general] Why does Watir sometimes not open an IE window,

2007-01-29 Thread Ravi
You need to make the scheduled job 'interactive'. It allows the job to interact with the desktop of the user who is logged on at the time the job runs. I typically schedule jobs through command prompt using at /interactive I guess there is an equivalent in Scheduler as well -Ravi

Re: [Wtr-general] how to make Watir output the current system date through a command

2007-01-29 Thread Nathan Christie
This is a Ruby Date object and its functions: require 'Date' myDate = Date.today().strftime(%d/%m/%y) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6308messageID=17766#17766

Re: [Wtr-general] Why does Watir sometimes not open an IE window,

2007-01-29 Thread Nathan
Thanks ravishan, I am not using AT to create scheduled tasks, rather SCHTASKS (only available in Windows XP) to create my scheduled task on the fly (when I need it) from the command line, and there is not an option /INTERACTIVE for SCHTASKS. Any other suggestions? Nathan

Re: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed together, how do I choose?

2007-01-29 Thread Nathan
Thank you very much for your help! :) Nathan - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315messageID=17773#17773 ___ Wtr-general mailing list

Re: [Wtr-general] Why does Watir sometimes not open an IE window,

2007-01-29 Thread Nathan
I just resolved my issue with this - you're right, it's not Watir at all, rather it had to do with the scheduled task. In the cases where I did not see the browser window, this was because I was logged in as a different user than the run user that the scheduled task contained. So I changed my

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Suman Goel
Yes. I did what you wrote below and it did not work -Suman _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Rogers Sent: Sunday, January 28, 2007 3:56 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? presumably

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Paul Rogers
can you elaborate on that? - Original Message - From: Suman Goel To: wtr-general@rubyforge.org Sent: Monday, January 29, 2007 5:08 PM Subject: Re: [Wtr-general] how to populate hidden text area? Yes. I did what you wrote below and it did not work -Suman

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Paul Rogers
It seems to work fine for me: irb(main):017:0 puts ie.text_field(:id , /h/).value abc = nil irb(main):018:0 ie.text_field(:id , /h/).set('gg') WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Suman Goel
Since my text area is a required field and .value sets the value in the background, when submitting the form, I get a message to fill in the details for the required field. I need to fill in the value on UI only. .value sets it in the background. I need a method like .set which sets the value

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Paul Rogers
can you post the html of the text area and of the button - there may be some javascript going on. I also dont understand that if its a required field that its also hidden? Paul - Original Message - From: Suman Goel To: wtr-general@rubyforge.org Sent: Monday, January 29, 2007

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Suman Goel
Hi Paul, There is definitely some java script going on because I don't see anything in the html. Please have a look at the html. Suman HTML for BUTTON (Next Step) td class=input table width=100% cellspacing=0 cellpadding=0 border=0 tr

[Wtr-general] url for link

2007-01-29 Thread Naga Harish Kanegolla
Hi all, Till now I am using ie.link(:url,http//www.xyz/abc.html) for a link in watir.Now I have a problem for the ajax link. i.e., the url obtained in the html source is a href=# onclick=new Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', {asynchronous:true,

[Wtr-general] bug with text_fields.show

2007-01-29 Thread Paul Rogers
irb(main):012:0 ie.showAllObjects ---Objects in page - text name=aa id= value= alt= textarea name=hidden id=hvalue= = nil irb(main):013:0 ie.text_fields.show index id

Re: [Wtr-general] custom attributes

2007-01-29 Thread Prema Arya
Yes we can do it in FireWatir also, there are two ways you can do: require 'firewatir' include FireWatir ff = Firefox.new(5) ff.goto(file:///F:/extras/firewatir/custom.html) puts ff.text_field(:custom, custom).value puts ff.text_field(:id, id).attribute_value(custom) ff.close html code

Re: [Wtr-general] how to populate hidden text area?

2007-01-29 Thread Suman Goel
I forgot to mention in my previous email that on irb, this solution is working as displayed below. But in IE, it does not since the text field is a required field and expecting a value at the time of clicking the submit button. I need some way to overlook that required flag of the field.

Re: [Wtr-general] url for link

2007-01-29 Thread Ryan Doherty
The best way to do this is to completely seperate your markup (html) from your behaviour (js). Your link should actually point to a real URL that works in case someone has JS turned off. This way you can select the link with ie.link(:url, 'linkurl'). If you give the url a unique id or even a