[wtr-general] Re: click_no_wait, why so inconsistent?
Sorry for taking so long to answer, but it might be related with the bug submitted by me http://jira.openqa.org/browse/WTR-446 You could check if that makes any difference. Jarmo On May 24, 8:19 pm, cslumension cslumens...@gmail.com wrote: *high five* Don't know why, and hopefully you'll enlighten me, but browser.back, browser.forward before calling the click_no_wait method works like a champ so far. It would always stop at the second link, but my script is up to the 8th download now and still looking good. Thanks for the help, really. On May 22, 5:39 am, Jarmo Pertman jarm...@gmail.com wrote: Hi. Try to press browser back and forward button while your test hangs to see if there's anything happening. If there is then i might just have an idea, what causes this. Temporary solution would be to just issue browser.back and browser.forward before trying to save some file again. Let us know if this helps you and i'll bring this topic up with Watir's developers. Jarmo On May 22, 2:48 am, cslumension cslumens...@gmail.com wrote: Want to download files, using a click_no_wait method, which works great the first time it's called, but each sequential call after that only highlights the item and no Save As box is displayed. There is a similar issue raised two years ago without a defined conclusion,http://groups.google.com/group/watir-general/browse_thread/thread/fb7... I call the element like so, ie.link(:href, downloadURL.to_s).click_no_wait The element is defined as so, a id=download_btn class=buttonEnable onmouseout= onmouseover= onclick=MarkDownloadFunction(some identifier) href=/path/to/ zipfile.zipDownload/a the onclick DownloadFunction just sets the class to an enable/disable button to make it look like the button has been pressed with a new image from CSS. I found another thread about troubleshooting the click_no_wait here,http://groups.google.com/group/watir-general/browse_thread/thread/222... The patch for 1.6.5 doesn't seem to apply to me since I am using a different version of Ruby. I tried editing the watir/ page_container.rb file as explained in the previous thread's link to Jarmo's post, but the console just sits there. I get no feedback after running the command generated in the click_no_wait text file. Ever better, if I open up google in IRB and call click, click_no_wait on buttons, they work just fine, every time! Maybe there is something unique to this website that is stopping click_no_wait somehow, but I am out of ideas. My system, XP SP2 Ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32] Watir 1.6.5 Thanks for taking the time to read through my post. -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@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] Re: Rich calender how to get value
If you are not sure what you want to do, please try the cases you have. Wesley. For life, the easier, the better. On Wed, Jun 30, 2010 at 1:38 PM, naresh nareshvatsa...@gmail.com wrote: Hi, I am confused in rich calender, i need to click image and then get elements or do like following ie.cell(:class = j_id354_j_id355DayCell rich-calendar-cell rich- calendar-btn, :text = 16).click which Linden suggested. I am confused class, there is 2 classes in HTML code. class=rich-calendar-input class=rich-calendar-button which one to use. My requirement to select a 30-jun-2010 date from calender. Regards, Naresh On Jun 29, 8:32 pm, Chuck van der Linden sqa...@gmail.com wrote: If it's the same as the sample that was linked early in the thread, when this control is rendered in the UI, it is a series of table cells, and each cell is 'wired' for a number of events. You may need to experiment with what events are fired in what order, I'd start however with trying the following What you are looking at is structured around a table, and each date is a cell. Because some dates appear more than once you cannot reliably identify by the cell text alone, and will need to use some other means to identify the 'right' type of cell that has the right text. The ID is completely positional within the grid, meaning that it's relationship to the date will be different each month (7 possibilties). that makes using ID to get the right cell a total pain. This would seem to make the best option to utilize the CLASS of the cell, since the controll uses a small set of potential classes (borders, holidays, workdays)So using Class along with Text might be your best bet, presuming of course that you want to pick a date in the current month of the current year etc. (otherwise you are going to need to first click in the navigation cell, part of an inner table, that lets you pick month and year. OTOH since those values are unique, you should be able to select them by cell text alone. .. So it will depend on if you test uses some date relative to 'today' or is always picking the same date. Relative to Today is fairly easy given Ruby's fairly robust stuff for handling dates, but is problimatic in that the date could end up falling on a holiday, meaning it would be difficult to predict the cell's class ahead of time If you are going to always pick the same date, choose one that is NOT in the current month, otherwise your script will break as soon as the month changes. This means you will first need to set the calendar control to a specific year and month, THEN pick your day of the week. Identify it as a Cell element within a Table, In the example the main table container in the example has the Class rich-calendar- exterior rich-calendar-popup undefined The cells for dates have three potential classes, there's a special one for 'border' days (the dates in the months before or after the current month) one for the 'holidays' (sat and sun) and one for the weekdays of the current month.. If I wanted to pick a weekday of the current month, then once the proper thing is clicked to make the calendar visiable (rendered) you could so something along these lines I think browser.cell(:class = j_id354_j_id355DayCell rich-calendar-cell rich- calendar-btn, :text = 16).click Since I'm not too sure of the first part of that class (might be dynamically created) you might have to use a regular expression just using the second part (/rich-calendar-cell rich-calendar-btn/) in order to reliably identify the cell by class and text. (that presumes just doing a click is good enough, potentially you might have to fire other events, you'll need to experiment) The IE developer Toolbar is a great help in making sense of controls like this, as it allows you to view the control as it is rendered into the DOM, (Firebug has similary abilities, I just know how to use the IE tool better, so it's what I use) On Jun 28, 5:07 am, naresh nareshvatsa...@gmail.com wrote: 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;
Re: [wtr-general] question for ff browser
Hi All, To add my question to this thread. i have a scenario when in I have initialized first IE say ie1 where in i have declared a variable SignIn for say SignIn button and When I click on some link it opens a new window and I want to work on that window for which I will use ie2 = Watir::IE.attach(:title, second window title) and My question is if I want to make use of variable SignIn for IE2. how can i achieve this? following is the sample code ie1 = Watir::IE.new() ie1.goto(gmail.com) signin = ie1.button(:text, SignIn) now I did some operation and opened a new gmail login page in new browser and I attached it to ie2 in the following way ie2 = Watir::IE.attach(:title, can be anything) now instead of using ie2.button(:text, Singin).click() is there any way that I can make use of already existing variable signin ? Regards, Kiran On Fri, Jun 18, 2010 at 1:23 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jun 17, 2010 at 11:10 PM, Cristina cristina.toro...@gmail.com wrote: The question is how can I close the second browser and return to the main one to continue checking the other links? browser1.link(how, what).click browser2 = Watir::Browser.attach(how, what) # do something with browser2 browser2.close # continue with browser1 More information: http://wiki.openqa.org/display/WTR/New+Browser+Windows Ask if you have further questions. Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- 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] question for ff browser
2010/6/30 kiran yajamanyam kiranyajaman...@gmail.com signin = ie1.button(:text, SignIn) You could do something like this: def signin(browser) browser.button(:text, SignIn) end signin(ie1).click signin(ie2).click Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- 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] question for ff browser
Great solution :). Thank you very much :) On Wed, Jun 30, 2010 at 6:50 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: 2010/6/30 kiran yajamanyam kiranyajaman...@gmail.com signin = ie1.button(:text, SignIn) You could do something like this: def signin(browser) browser.button(:text, SignIn) end signin(ie1).click signin(ie2).click Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- 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] question for ff browser
On Wed, Jun 30, 2010 at 3:27 PM, kiran yajamanyam kiranyajaman...@gmail.com wrote: Great solution The power of ruby :) Ž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 site at stackexchange.com
Update on the proposal: we have 34 followers, 26 to go. Please also submit example questions and vote on existing ones. If you need inspiration for the questions: http://groups.google.com/group/watir-general/topics http://stackoverflow.com/tags/watir http://wiki.openqa.org/display/WTR/FAQ The site is at http://bit.ly/watirse Ž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
You have to ask yourself how much value you provide to your project by testing some third party tool beyond it's being integrated properly into your product. If it was me, I'd look for the most expedient way to get the value I needed 'set' If the calendar has an input box that accepts my typing into it, then doing something similar to that in your tests might be the best route. As always with any tool that drives the browser (Watir, Selenium, etc) you look at 'what do I do manually to control this thing?' and then basically find ways to simulate that using the automation code. If it LETS you just click in a given spot and input a value, then that's what I'd try to automate in most of my cases (beyond one basic test that the calendar works when you pick the date that way) But some of these tools, the ONLY way to get the date into the field is by 'picking' it from the calendar, and there is no 'manual entry' option that lets you 'type' in a value. So you are stuck automating the clicking on specific cells in the calendar. To do that you need to write a script that's going to work a month or a year from now, so you'll need to go throught the motions of clicking in the portion (a sub table in the example I looked at) of the control that lets you pick the year and month, Then picking the year and month, THEN picking the day of the month. Otherwise a day from now you'll be clicking on July 30 instead of June 30 Based on the sample I looked at, almost all of those are going to be .cell elements, and hopefully just doing a 'click' on the element will work for what you need. On Jun 30, 5:51 am, Wesley Chen cjq@gmail.com wrote: If you are not sure what you want to do, please try the cases you have. Wesley. For life, the easier, the better. On Wed, Jun 30, 2010 at 1:38 PM, naresh nareshvatsa...@gmail.com wrote: Hi, I am confused in rich calender, i need to click image and then get elements or do like following ie.cell(:class = j_id354_j_id355DayCell rich-calendar-cell rich- calendar-btn, :text = 16).click which Linden suggested. I am confused class, there is 2 classes in HTML code. class=rich-calendar-input class=rich-calendar-button which one to use. My requirement to select a 30-jun-2010 date from calender. Regards, Naresh On Jun 29, 8:32 pm, Chuck van der Linden sqa...@gmail.com wrote: If it's the same as the sample that was linked early in the thread, when this control is rendered in the UI, it is a series of table cells, and each cell is 'wired' for a number of events. You may need to experiment with what events are fired in what order, I'd start however with trying the following What you are looking at is structured around a table, and each date is a cell. Because some dates appear more than once you cannot reliably identify by the cell text alone, and will need to use some other means to identify the 'right' type of cell that has the right text. The ID is completely positional within the grid, meaning that it's relationship to the date will be different each month (7 possibilties). that makes using ID to get the right cell a total pain. This would seem to make the best option to utilize the CLASS of the cell, since the controll uses a small set of potential classes (borders, holidays, workdays) So using Class along with Text might be your best bet, presuming of course that you want to pick a date in the current month of the current year etc. (otherwise you are going to need to first click in the navigation cell, part of an inner table, that lets you pick month and year. OTOH since those values are unique, you should be able to select them by cell text alone. .. So it will depend on if you test uses some date relative to 'today' or is always picking the same date. Relative to Today is fairly easy given Ruby's fairly robust stuff for handling dates, but is problimatic in that the date could end up falling on a holiday, meaning it would be difficult to predict the cell's class ahead of time If you are going to always pick the same date, choose one that is NOT in the current month, otherwise your script will break as soon as the month changes. This means you will first need to set the calendar control to a specific year and month, THEN pick your day of the week. Identify it as a Cell element within a Table, In the example the main table container in the example has the Class rich-calendar- exterior rich-calendar-popup undefined The cells for dates have three potential classes, there's a special one for 'border' days (the dates in the months before or after the current month) one for the 'holidays' (sat and sun) and one for the weekdays of the current month.. If I wanted to pick a weekday of the current month, then once the proper thing is clicked to make the calendar visiable (rendered) you could so something along