[wtr-general] Clicking a div with last index
At present in my Web Page I can See a lot of divs and i access them using indexes using this code ie.div(:text = 'div',:index =1).click ie.div(:text = 'div',:index =2).click ie.div(:text = 'div',:index =3).click ie.div(:text = 'div',:index =4).click Is there any way I can click on the last Index directly like ie.div(:text = 'div',:index =Last).click -- Thanks and Regards Ajitesh Srinetra -- 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 get frames when that page is revealed by its onload event?
Hi, Assume that there are 2 frames, A and B. I click a link in A, the server send the html to frame B. That html includes onload action to its body tag and that onload action submits hidden form. The result of the submit of the hidden form, the server send a new html including frames. I could get the html including that onload action. But I could not get the frames. How can I get those frames? Thanks in advance. -- 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] Clicking a div with last index
Do you have any other attribute value other than :text='div' ? Like class or ID . If you have any other value you can directly use them. -K On Fri, Jun 25, 2010 at 6:33 PM, Ajitesh Srinetra ajitesh.srine...@gmail.com wrote: At present in my Web Page I can See a lot of divs and i access them using indexes using this code ie.div(:text = 'div',:index =1).click ie.div(:text = 'div',:index =2).click ie.div(:text = 'div',:index =3).click ie.div(:text = 'div',:index =4).click Is there any way I can click on the last Index directly like ie.div(:text = 'div',:index =Last).click -- Thanks and Regards Ajitesh Srinetra -- 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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Clicking a div with last index
On Fri, Jun 25, 2010 at 3:03 PM, Ajitesh Srinetra ajitesh.srine...@gmail.com wrote: Is there any way I can click on the last Index directly like ie.div(:text = 'div',:index =Last).click I do not think we have something like that. Maybe you would be able to do it with xpath: http://wiki.openqa.org/display/WTR/XPath Željko -- 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: Rich calender how to get value
Hi, Anyone can guide me? I am struck in calender. Regards, Naresh On Jun 25, 4:44 pm, naresh nareshvatsa...@gmail.com wrote: Hi , s:decorate id=endDateDecorate template=../layout/edit.xhtml ui:define name=label#{label.title_end_date}:/ui:define rich:calendar value=#{eventBean.instance.endDate} timeZone=#{org.jboss.seam.international.timeZone} enableManualInput=true datePattern=dd-MM- id=endDate/ / s:decorate HTML code generated for above calnder,can anyone guide me how to click calendar in watir script div id=globalForm:startDateDecorate div class=proplabel for=globalForm:startDateDecorate:startDate class=name Start Date:/label span class=value span id=globalForm:startDateDecorate:startDatePopup input class=rich-calendar-input id=globalForm:startDateDecorate:startDateInputDate name=globalForm:startDateDecorate:startDateInputDate style=vertical- align: middle; type=text /img alt= class=rich-calendar-button id=globalForm:startDateDecorate:startDatePopupButton style=vertical-align: middle src=/venus/a4j/g/ 3_3_1.GAorg.richfaces.renderkit.html.iconimages.CalendarIcon/DATB/ eAE7fv4Kw6znAA4mA-w_ /input id=globalForm:startDateDecorate:startDateInputCurrentDate name=globalForm:startDateDecorate:startDateInputCurrentDate style=display:none type=hidden value=06/2010 //spandiv id=globalForm:startDateDecorate:startDateIFrame style=display: none;/divdiv id=globalForm:startDateDecorate:startDate style=display: none;/divdiv id=globalForm:startDateDecorate:startDateScript style=display: none;script type=text/javascriptnew Calendar('globalForm:startDateDecorate:startDate', {dayListTableId: 'globalForm:startDateDecorate:startDateDay', weekNumberBarId: 'globalForm:startDateDecorate:startDateWeekNum', weekDayBarId: 'globalForm:startDateDecorate:startDateWeekDay', currentDate: new Date(2010,5,25), selectedDate: null, datePattern: 'dd-MM-', jointPoint: 'bottom-left', direction: 'bottom-right', boundaryDatesMode:'inactive', popup: true, enableManualInput: true, showInput: true, disabled: false, readonly: false, ajaxSingle: true, verticalOffset:0, horizontalOffset: 0, style:'z-index: 3; ', firstWeekDay: 0, minDaysInFirstWeek: 1, todayControlMode:'select', showHeader:true, showFooter:true, showWeeksBar:true, showWeekDaysBar:true, showApplyButton:false, resetTimeOnDateSelect:false, defaultTime:{hours:12,minutes:0}, labels:{apply:'Apply', today:'Today', clean:'Clean', cancel:'Cancel', ok:'OK', close:'x'}, 'monthLabels': ['January','February','March','April','May','June','July','August','September','October','November','December'] , 'monthLabelsShort': ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] , 'weekDayLabels': ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] , 'weekDayLabelsShort': ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] }).load();/script/div /span span class=error /span /div/div Regards, Naresh On Jun 24, 10:23 pm, orde ohil...@gmail.com wrote: I google'd up a RichFaces example:http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf. It looks like you don't enter the date into the text field, but-- rather--you click on the calendar icon and select a date. Peeking at the (ajax-heavy) HTML, you'll probably need to click on the calender image and then use the fire_event method to trigger the event handlers in the elements that you need to access. Here's the link to the fire_event documentation:http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Element.html#M000557 Hope it helps. orde On Jun 24, 4:17 am, naresh nareshvatsa...@gmail.com wrote: Hi , Fot input text , text_field method is available. What method is available for following rich calender rich:calendar value=#{eventBean.instance.endDate} timeZone=#{org.jboss.seam.international.timeZone} enableManualInput=true datePattern=dd-MM- id=endDate/ Regards On Jun 24, 4:10 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jun 24, 2010 at 1:07 PM, naresh nareshvatsa...@gmail.com wrote: Can anyone guide me how to do that in watir? What is the problem? What have you tried? Is the calendar public, so we could try too? Željko -- watir.com - community
Re: [wtr-general] Re: Rich calender how to get value
On Mon, Jun 28, 2010 at 12:54 PM, naresh nareshvatsa...@gmail.com wrote: Anyone can guide me? I am struck in calender. Which HTML element do you need to access (click, set...) in the HTML you have provided? Željko -- 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: Clicking a div with last index
Or, you could do it like this which is not so good anyway: ie.divs.find_all {|div| div.text == div}.last.click Better add some id, name, class or whatever attributes to the divs to make it more robust and more readable. Jarmo On Jun 28, 11:31 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Jun 25, 2010 at 3:03 PM, Ajitesh Srinetra ajitesh.srine...@gmail.com wrote: Is there any way I can click on the last Index directly like ie.div(:text = 'div',:index =Last).click I do not think we have something like that. Maybe you would be able to do it with xpath: http://wiki.openqa.org/display/WTR/XPath Željko -- 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: Rich calender how to get value
i want to click calender and select date 28-May-2010. On Jun 28, 3:59 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Jun 28, 2010 at 12:54 PM, naresh nareshvatsa...@gmail.com wrote: Anyone can guide me? I am struck in calender. Which HTML element do you need to access (click, set...) in the HTML you have provided? Željko -- 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] Re: Rich calender how to get value
On Mon, Jun 28, 2010 at 1:22 PM, naresh nareshvatsa...@gmail.com wrote: i want to click calender I am asking what do you need to click. Do you know how to use a tool like Firebug? http://getfirebug.com/ Željko -- 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: Rich calender how to get value
Hi All, i am using internet explorer to test my web application. I have to click save button in my application to create record. I am able to set value for textfield,radibutton,selectlist in watir script , but not able to set/pickup value for calender. This calender is rich calenderrich:calender from Rcihfaces. The html code generated i am pasting once again. I want to pick up date like 28-May-2010 or any other date. div id=globalForm:startDateDecorate div class=proplabel for=globalForm:startDateDecorate:startDate class=name Start Date:/label span class=value span id=globalForm:startDateDecorate:startDatePopup input class=rich-calendar-input id=globalForm:startDateDecorate:startDateInputDate name=globalForm:startDateDecorate:startDateInputDate style=vertical- align: middle; type=text /img alt= class=rich-calendar-button id=globalForm:startDateDecorate:startDatePopupButton style=vertical-align: middle src=/venus/a4j/g/ 3_3_1.GAorg.richfaces.renderkit.html.iconimages.CalendarIcon/DATB/ eAE7fv4Kw6znAA4mA-w_ /input id=globalForm:startDateDecorate:startDateInputCurrentDate name=globalForm:startDateDecorate:startDateInputCurrentDate style=display:none type=hidden value=06/2010 //spandiv id=globalForm:startDateDecorate:startDateIFrame style=display: none;/divdiv id=globalForm:startDateDecorate:startDate style=display: none;/divdiv id=globalForm:startDateDecorate:startDateScript style=display: none;script type=text/javascriptnew Calendar('globalForm:startDateDecorate:startDate', {dayListTableId: 'globalForm:startDateDecorate:startDateDay', weekNumberBarId: 'globalForm:startDateDecorate:startDateWeekNum', weekDayBarId: 'globalForm:startDateDecorate:startDateWeekDay', currentDate: new Date(2010,5,25), selectedDate: null, datePattern: 'dd-MM-', jointPoint: 'bottom-left', direction: 'bottom-right', boundaryDatesMode:'inactive', popup: true, enableManualInput: true, showInput: true, disabled: false, readonly: false, ajaxSingle: true, verticalOffset:0, horizontalOffset: 0, style:'z-index: 3; ', firstWeekDay: 0, minDaysInFirstWeek: 1, todayControlMode:'select', showHeader:true, showFooter:true, showWeeksBar:true, showWeekDaysBar:true, showApplyButton:false, resetTimeOnDateSelect:false, defaultTime:{hours:12,minutes:0}, labels:{apply:'Apply', today:'Today', clean:'Clean', cancel:'Cancel', ok:'OK', close:'x'}, 'monthLabels': ['January','February','March','April','May','June','July','August','September','October','November','December'] , 'monthLabelsShort': ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] , 'weekDayLabels': ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] , 'weekDayLabelsShort': ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] }).load();/script/div /span span class=error /span /div/div On Jun 28, 4:29 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Jun 28, 2010 at 1:22 PM, naresh nareshvatsa...@gmail.com wrote: i want to click calender I am asking what do you need to click. Do you know how to use a tool like Firebug? http://getfirebug.com/ Željko -- 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: WatiR Recorder++
I've just got my bachelor's degree from the school with the thesis of Web Applications’ User Interface Based Testing Automation. Unfortunately it is written in Estonian, so no point of giving the link in here i guess :P Anyway, also capture/replay was a small topic in the thesis, that's why I wouldn't avoid the debate at all. I would like to help people to understand the problems of this approach before too many hours of their lives have been wasted. I'm just giving few of the references i've used in my thesis if you don't have any personal experience with test automation yet. You can read just the parts about capture/replay if you're interested. Zallar, Kerry - Practical Experience in Automated Testing http://www.methodsandtools.com/archive/archive.php?id=33 Crispin, Lisa - An Agile Tool Selection Strategy for Web Testing Tools http://www.methodsandtools.com/archive/archive.php?id=57 AppLabs - Test Automation http://www.applabs.com/internal/app_whitepaper_test_automation_delivering_business_value_1v00.pdf In short, don't waste time with capture/replay because in the end you'll die in frustration :) Jarmo On Jun 25, 5:36 pm, joedio joe...@comcast.net wrote: I'll also avoid the debate on the benefits and drawbacks of recorders but I'll mention that there is another Watir Recorder available, and it includes an IDE and test framework . Check out TestWise, available at: http://itest2.com/ I'm personally not using it, but it looks very promising. Joe On Jun 23, 2:22 am, Sohail Mirza mrz...@gmail.com wrote: Hi All, Can anyone explain me below points *How to installed Watir Recorder ++?* *What is the difference between WatiR Recorder++ and WatiR Maker?* Best Regards, Sohail -- 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] Re: WatiR Recorder++
On Mon, Jun 28, 2010 at 2:29 PM, Jarmo Pertman jarm...@gmail.com wrote: I've just got my bachelor's degree Congratulations! :) Željko -- 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: Clicking a div with last index
Ajitesh, While I'm not sure why you would click on a div, but here's one way you could click on the last one: # Get the total number of the div elements on the page iLastDivIndex = browser.divs.length # Click on the last div element browser.div(:index, iLastDivIndex).click Joe On Jun 25, 7:03 am, Ajitesh Srinetra ajitesh.srine...@gmail.com wrote: At present in my Web Page I can See a lot of divs and i access them using indexes using this code ie.div(:text = 'div',:index =1).click ie.div(:text = 'div',:index =2).click ie.div(:text = 'div',:index =3).click ie.div(:text = 'div',:index =4).click Is there any way I can click on the last Index directly like ie.div(:text = 'div',:index =Last).click -- Thanks and Regards Ajitesh Srinetra -- 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] Re: Clicking a div with last index
Hi Joe We have a complex GUI with the ext Frame work This is having a lot of divs.Now coming to the solution iLastDivIndex = browser.divs.length with fetch the index of the last div in the page But what I want is the index of the div with text div. Thanks and Regards Ajitesh Srinetra On Mon, Jun 28, 2010 at 7:05 PM, joedio joe...@comcast.net wrote: Ajitesh, While I'm not sure why you would click on a div, but here's one way you could click on the last one: # Get the total number of the div elements on the page iLastDivIndex = browser.divs.length # Click on the last div element browser.div(:index, iLastDivIndex).click Joe On Jun 25, 7:03 am, Ajitesh Srinetra ajitesh.srine...@gmail.com wrote: At present in my Web Page I can See a lot of divs and i access them using indexes using this code ie.div(:text = 'div',:index =1).click ie.div(:text = 'div',:index =2).click ie.div(:text = 'div',:index =3).click ie.div(:text = 'div',:index =4).click Is there any way I can click on the last Index directly like ie.div(:text = 'div',:index =Last).click -- Thanks and Regards Ajitesh Srinetra -- 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 -- Thanks and Regards Ajitesh Srinetra -- 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] speed up checkbox selection
I've used ie.speed = :zippy to speed up text box input but it appears when my scripts enable a checkbox this causes form entry to slow down (i.e the checkbox turns yellow and prevents the next field from being filled out for a moment). I was wondering if there was anything I could do to speed this along? I'm using Ruby 1.8.6 with Watir 1.6.5 -- 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