[wtr-general] Is there any way to run a watir script automatically in every hour.

2009-08-11 Thread Maumita
Hi, We are developing a shopping site. I have written a script, it basically hit a WEB URL and capture the page load time - 1. It hits the home page 2. It hits the products page (This page has images of 9 items) For the above cases the script return me the time taken to load the page. Problems:

[wtr-general] Re: user experience response time script.

2009-08-11 Thread Maumita
Thanks a lot for the quick help.. It works for me.. Also, I will definitely use Jmeter for performace Thanks Maumita On Aug 11, 7:01 pm, Felipe Knorr Kuhn wrote: > Hello Maumita, > > As Tony said, you should probably stick to JMeter. > > But, if you really want to do that quickly with Ruby, yo

[wtr-general] Re: Cannot subclass Table

2009-08-11 Thread Bret Pettichord
Jim, When you are modifying the Watir codebase itself, you really need to know how to read the source code that is there. We haven't really written any documentation on "how to modify Watir so that it does what you really want". Not yet at least. Bret On Aug 11, 8:23 am, Jim Evans wrote: > Tha

[wtr-general] Re: Trouble testing dynamically-created HTML

2009-08-11 Thread Bret Pettichord
My only explanation would be that the page changes (again) after the call to "includes?" returns true but before you select the item. Bret On Aug 5, 9:32 am, Burdette Lamar wrote: > I’ve been having a lot of trouble with stuff that Javascript builds in > the DOM after the complete HTML page is

[wtr-general] Re: Trouble testing dynamically-created HTML

2009-08-11 Thread Bret Pettichord
On Aug 10, 8:28 pm, Jari Bakken wrote: > On Tue, Aug 11, 2009 at 1:35 AM, Bret Pettichord wrote: > > > I just took a quick look at the Watir code (latest from trunk). I see > > an "include?" method but not an "includes?" method. > > They both exist. SelectList#includes? is aliased in camel_case

[wtr-general] Re: How can I add a new method to Watir::Radio?

2009-08-11 Thread Bret Pettichord
You need to show us more code. E.g. what method is giving you this error? Also send us the backtrace. Bret On Aug 11, 2:56 am, John Kolokotronis wrote: > Hi All, > > I thought my understanding of Ruby classes was getting a bit better > but I can't seem to add a new method to Watir::Radio, witho

[wtr-general] Re: How can I add a new method to Watir::Radio?

2009-08-11 Thread Dylan
Try adding require 'watir/ie' after your require 'watir' line -Dylan On Aug 11, 2:03 am, John Kolokotronis wrote: > Thanks - I noticed the Radio class is in input_elements.rb and tried > the structure you suggested before my original post: > > module Watir >    class Radio < RadioCheckCommon >

[wtr-general] Re: Modeling web pages and table rows

2009-08-11 Thread Jim Evans
Sure, I'd be happy to. I think, though, that a little more background might be in order. As I mentioned before, I have a table on the page which represents a list of tickets. The first row of the table is a row of header cells; subsequent rows represent individual tickets. It's a little more compl

[wtr-general] Testing dynamically-created elements in the DOM

2009-08-11 Thread Burdette Lamar
(I erred in an earlier post by asking two questions in one post. This post puts the second question separately.) Some of the HTML pages I test are modified in the DOM after the HTML is delivered. One of the first manifestations of this that I saw was getting an exception when I tried to select

[wtr-general] Re: Trouble testing dynamically-created HTML

2009-08-11 Thread Burdette Lamar
I erred in asking two questions here. I'll post the second separately. On Aug 5, 9:32 am, Burdette Lamar wrote: > I’ve been having a lot of trouble with stuff that Javascript builds in > the DOM after the complete HTML page is returned.  I’ve tried to > counter that with extreme defensiveness.

[wtr-general] Re: user experience response time script.

2009-08-11 Thread Felipe Knorr Kuhn
Hello Maumita, As Tony said, you should probably stick to JMeter. But, if you really want to do that quickly with Ruby, you could try the following: t1 = Time.now < Navigate through the site > t2 = Time.now puts "time taken: " + t2-t1.to_s + " seconds" FK On Tue, Aug 11, 2009 at 9:25 AM, T

[wtr-general] Re: Cannot subclass Table

2009-08-11 Thread Jim Evans
That's fantastic. Thanks for that. Now that it's working, can someone point me to some further reading as to why it works? What does the "/ ie" imply? If it's simply a namespace thing, I can understand that. What documentation did I miss that I didn't figure this without having to bother you good

[wtr-general] Re: How to click the link in dynamically generated ajax content?

2009-08-11 Thread Durgesh Nadkarni
Hi Reveendran, Thanks a lot for the given code. But the code which I am getting is as follows: Previous Currently the 'Previous' link is disabled. But when I use verify statement it does not recognized that link is disabled. Thanks & Regards Durgesh. --- On Mon, 10/8/09, Raveendran P wrote:

[wtr-general] Re: undefined method `length' for nil:NilClass

2009-08-11 Thread John Kolokotronis
Why are you complicating the loop that much? If you only want cells 1 and 2, use the for i in 1..2 loop or for i in 1...3 (three dots - that'll exclude 3 by definition). But if you include the click in your loop, the 2nd time (and any other iteration) around won't work because you won't be on th

[wtr-general] A Solution for PopUps Work around for Click no Wait

2009-08-11 Thread Pallavi Sharma
Hi After being stuck with ClickNoWait, we found a "jugad" solution for the click no wait.. SetFocus on your button PressEnter PressEnter again Use obj.focus and auto it autoit.Send({"enter"}) it works like wonders. Helped us.. may be of some help to someone out there... Thanks Pallavi. --~-

[wtr-general] Re: user experience response time script.

2009-08-11 Thread Tony
Hi Maumita, The scenario you have described here is performance testing the shopping website. Would suggest you use jmeter or another performance test tool to do this. Watir is best used for functional testing. Thanks, Tony --~--~-~--~~~---~--~~ You received this

[wtr-general] Watir and Active X

2009-08-11 Thread Pallavi Sharma
Hi Has anyone ever countered a scenario below: Date of Birth Does anyone has an idea if we have to do it with Watir how will go about it. Any help appreciated..Please Thanks --~--~-~--~~~---~--~~ You received this mes

[wtr-general] user experience response time script.

2009-08-11 Thread Maumita
Hi, we are developing a shopping website. I want to write a user experience response time script. The script should contain the following steps - Users - 3 1. 3 users will hit a URL at the same time 2. 3 users will click on a product tab and the product page will appear. The product page will ha

[wtr-general] Re: undefined method `length' for nil:NilClass

2009-08-11 Thread Maumita
Please find the updated script - require 'watir' include Watir $excel_path = "D:/Data/dportalTestScripts/Product.xlsx" $sheet_id = 1 $excel = WIN32OLE.new("excel.application") $excel['Visible'] = true; $workbook = $excel.Workbooks.Open $excel_path $worksheet = $workbook

[wtr-general] Re: undefined method `length' for nil:NilClass

2009-08-11 Thread John Kolokotronis
The local variable i in your last line isn't defined anywhere in your script... So: ie.text_field(:name, "productName").set $worksheet.Range("a# {i}").value) i isn't defined so no value is retrieved. If you are trying to retrieve a number of cells, you can do it with a for loop: for i in 1..5 #

[wtr-general] undefined method `length' for nil:NilClass

2009-08-11 Thread Maumita
Hi all I have written a script, in which from an excel file a value will get enter in the text field "ie.text_field(:name, "productName").set $worksheet.Range("a#{i}").value" My script: require 'watir' include Watir $excel_path = "D:/Data/dportalTestScripts/Product.xlsx" $sheet_id =

[wtr-general] Re: Need a sample code to import test data from Excel sheet

2009-08-11 Thread Wesley Chen
You can search in the google group, you can also turn to Watir community, you can get all the great documents about what you want. Please search... Thanks. Wesley Chen. On Tue, Aug 11, 2009 at 5:04 PM, Smruti Ranjan Kar < smrutiranjan@gmail.com> wrote: > require 'win32ole' > > $application

[wtr-general] Re: Need a sample code to import test data from Excel sheet

2009-08-11 Thread Smruti Ranjan Kar
require 'win32ole' $application = WIN32OLE.new('Excel.Application') generalworksheet=$application.Workbooks.Open(Dir.getwd+"\\Testdata\\testdata.xls").Worksheets("General") generalworksheet.Activate $test_site=generalworksheet.Cells(6,2).value On Tue, Aug 11, 2009 at 1:14 PM, zakir hussain wrote

[wtr-general] Re: How can I add a new method to Watir::Radio?

2009-08-11 Thread John Kolokotronis
Thanks - I noticed the Radio class is in input_elements.rb and tried the structure you suggested before my original post: module Watir class Radio < RadioCheckCommon def myMethod puts "this is my method" end end end But this just generates another error: uninitialized

[wtr-general] Re: How can I add a new method to Watir::Radio?

2009-08-11 Thread Dylan
Try looking at where the radio methods are defined in watir, that should give you a clue. In input_elements.rb, the declaration of Radio functions look like this: Module Watir class Radio < RadioCheckCommon def myMethod puts "this is my method end end end -Dylan On

[wtr-general] How can I add a new method to Watir::Radio?

2009-08-11 Thread John Kolokotronis
Hi All, I thought my understanding of Ruby classes was getting a bit better but I can't seem to add a new method to Watir::Radio, without breaking all functionality for radio buttons... E.g. I tried adding a dummy method like this: class Watir::Radio def myMethod puts "this is my method"

[wtr-general] Re: Need a sample code to import test data from Excel sheet

2009-08-11 Thread zakir hussain
Hi, I wud like to post in this group. Kindly add me in this chain Thanks zakir --~--~-~--~~~---~--~~ 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

[wtr-general] Need a sample code to import test data from Excel sheet

2009-08-11 Thread Naveen devadass
Hi all, Can you please help on this --~--~-~--~~~---~--~~ 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

[wtr-general] Re: RDoc files on rubyforge need to be updated

2009-08-11 Thread Brandon Faloona
hmm... I made that assumption after comparing my gem server version to this: http://wtr.rubyforge.org/rdoc/classes/Watir/RadioCheckCommon.html ... which shows different methods available. Brandon On Aug 10, 7:46 am, Bret Pettichord wrote: > They are updated to 1.6.2. Why do you say they aren't