Re: [Wtr-general] How do I click the OK button on a java alert?

2007-04-05 Thread shalini
Hi all, I am new to ruby, and have searched these forums for answers, but have not found anything that seems to work or help me. (including links to FAQ's which do not appear to be available anymore) Situation: I am writing ruby/watir scripts to automate tests against a website/application.

Re: [Wtr-general] Using Until

2007-04-05 Thread Bret Pettichord
Nicola Kennedy wrote: I want the code to do the following things: 1. Check on page for a link. 2. If link not there, press Next page 3. If link there, click on it. 4. When next page reached (if step 2 followed), repeat the action of looking for link/clicking next. Here is one

Re: [Wtr-general] IE nested class of module watir?

2007-04-05 Thread Bret Pettichord
aidy lewis wrote: I am unsure why IE is a nested class of the module watir All of the Watir classes are in the Watir module. This is to avoid collisions with classes you may be using from other packages. Watir tries to be a good citizen. If you look at other Ruby libraries, you will see that

[Wtr-general] Access all elements in a form

2007-04-05 Thread Sayali Patil
Hi All, How to access all the elements in a particular form ,in an html document using watir? Please let me know. Thanks, Sayali ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How do I click the OK button on a java alert?

2007-04-05 Thread Anupama Kaple
Hi Try this piece of code. I found this code on Waitr QA forums and I tried it in my suite. It worked def startClicker( OK, waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub(/ , \\ ) shortName = w.getShortFileName(longName) c = start ruby

[Wtr-general] Assign a Selected Value from Drop Down list to any varibale

2007-04-05 Thread vamsi
Hi, I need to slect one value from the dropdown list and want to store it into one varibale. For selecting value in drop down list: ie.select_list(:id, 'ctlWorkflow_ddlname').select_value('1') what is for reading and storing the same value into one Variable. Name = ? As i need to

Re: [Wtr-general] Assign a Selected Value from Drop Down list to any varibale

2007-04-05 Thread Ravi
names=ie.select_list(:id, 'ctlWorkflow_ddlname').getAllContents #array name0=ie.select_list(:id, 'ctlWorkflow_ddlname').getAllContents[0] #single item ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Assign a Selected Value from Drop Down list to any varibale

2007-04-05 Thread vamsi
Thank you very much . ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] .getElementsByTagName

2007-04-05 Thread aidy lewis
Are we all using the DOM method .getElementsByTagName to get for example, a level 2 heading? return document.getElementsByTagName('h2') Should we refactor these methods to make a more abstract method show_labels show_spans show_pres etc? Thanks aidy

Re: [Wtr-general] .getElementsByTagName

2007-04-05 Thread Charley Baker
In Watir 1.5 there is support for adding elements fairly easily so that you shouldn't have to call getElementsByTagName directly. We haven't added headings yet, but most other common elements are supported and easily extended, you could put the following in a file and include it in your scripts:

Re: [Wtr-general] Access all elements in a form

2007-04-05 Thread Sayali Patil
Hi Charley, I can access a single element in the form. What i want is i should be able to access all the elements in a form with a loop . Actually i have nested forms and i m not able to access each element individually ,so i want to try n access all the elements and further do the operations .