[wtr-general] Re: Script hangs while trying to close pop up
Hi Daryl I tried the above steps but stuck into the same problem, may be my machine issue , I will try to run the same script on some other machine may be this can be of some help. I will keep you guys posted Thanks a lot Namit On Aug 27, 6:53 am, Darryl (gem dandy) Brown d-l- br...@roadrunner.com wrote: Hello Namit, Please see the google example in my response to the following post - will watir-1.6.2 support pop-up messagehttp://groups.google.com/group/watir-general/browse_thread/thread/eeb... You must use click_no_wait Good luck, Darryl On Aug 26, 3:05 am, Namit namitjai...@gmail.com wrote: Hi Rohan Thanks for your reply I am using 1.8.6.26 version and also I used sleep after this command but in vain. I am working on it further, will reply with my observations Thanks Namit On Aug 26, 11:37 am, Rohan Ojha rohan.o...@bsil.com wrote: I have found that one important thing that people miss out on is that Ruby 1.8.6.27 doesn’t support click_no_wait. So I hope you are not using this version of Ruby. If yes then try with Ruby 1.8.6.26 Also always use sleep after click_no_wait and the pop-up handler method Thanks, Rohan Ojha -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Namit Sent: Wednesday, August 26, 2009 11:35 AM To: Watir General Subject: [wtr-general] Re: Script hangs while trying to close pop up Thanks a lot Tiffany for your reply, I tried other things too too like dialog.button('Cancel').click , click_no_wait and I tried Auto it etc but of no use. I am working on in further, will get back to you if I find something useful. By the way do you think that the script that I have posted above is incorrect or I need to modify it. Thanks Namit On Aug 25, 8:30 pm, tcfodor tcfo...@comcast.net wrote: Hi Namit, You may have already looked here, but the bulk of the knowledge on Watir and popups can be found here: http://wiki.openqa.org/display/WTR/Pop+Ups Off the top of my head, it seems like there were cases where we needed to use click_no_wait instead of just click to avoid hanging. Hope this helps! -Tiffany On Aug 25, 7:05 am, Namit namitjai...@gmail.com wrote: Hi All, My scenario is to click a image that results in a pop up. I want to click OK button of this Pop up. This is a straight scenario without much complexity still the script is not working and the pop up remains as it is. Here is my sample script require 'watir' require 'win32ole' require 'watir/ie' require 'watir\contrib\enabled_popup' $ie = Watir::IE.new $ie.goto 'some url/' $ie.button(:src, 'http://img1.yatra.com/yatra_blue-theme/images/common/ spacer.gif').click sleep 10 if $ie.enabled_popup puts 'inside if loop' hwnd =$ie.enabled_popup(10) puts hwnd w = WinClicker.new w.makeWindowActive(hwnd) w.clickWindowsButton_hwnd(hwnd,OK) end This script after clicking the image hangs and after this there is no action performed. The pop is a simple pop up with an OK button. Guys please tell me where I am going wrong. Any help will be highly appreciated Thanks Namit --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: WATIR WITH QC INTEGRATION
Hi Vinh, Thank you for your reply. My requirements are • The requirement is to execute the Ruby/Watir scripts through QC. • The test scripts must be saved in QC. • The result files must be available in QC. • From the QC user end, the process must be similar to the way QTP scripts are dealt with. Please help me in this regard. Thanks, kiran. On Aug 28, 6:17 am, Tran Tuan Vinh 10/08 tuanvinh1...@gmail.com wrote: Could you tell more detail your requirement? On Aug 28, 2:04 am, kumar gki...@gmail.com wrote: Hi All, In my project as per my client requirement,I have to integrate Watir with QC. It would be great help if you have any suggestions and help in this regard. Please help me. Thanks, kiran.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: WATIR WITH QC INTEGRATION
I still don't understand that you mention QC in your requirement?It mean a Tester or some tools which you want use it with Watir. And have you Ruby/Watir scripts already? On Aug 28, 5:18 pm, kumar gki...@gmail.com wrote: Hi Vinh, Thank you for your reply. My requirements are • The requirement is to execute the Ruby/Watir scripts through QC. • The test scripts must be saved in QC. • The result files must be available in QC. • From the QC user end, the process must be similar to the way QTP scripts are dealt with. Please help me in this regard. Thanks, kiran. On Aug 28, 6:17 am, Tran Tuan Vinh 10/08 tuanvinh1...@gmail.com wrote: Could you tell more detail your requirement? On Aug 28, 2:04 am, kumar gki...@gmail.com wrote: Hi All, In my project as per my client requirement,I have to integrate Watir with QC. It would be great help if you have any suggestions and help in this regard. Please help me. Thanks, kiran.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Reg-Image(need help urgent)
Hi iLa, try this ie.image(:value, submit) Thanks, Tony --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Reg-Image(need help urgent)
Hi HTML Code div class=submit-button-upload-image input type=image value=submit src=../images/ upload_Image_new.gif/ /div Please any one let me know WATIR code for this. I tried below code ie.button(:src, /upload_Image_new/).click Error Message C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :src, / upload_Image_new/ (Watir::Exception::UnknownObjectException) * I am learning stage. Regards iLa --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: WATIR WITH QC INTEGRATION
Hi Kumar, The test scripts can also be saved in QC. The result files, test results, steps etc can be updated back into QC. QC provides complete automation using its com library. Thanks, Tony --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help selecting elements of a drop down list when the site uses Javascript/ASP.net
HTML SelectList elements have two 'parameters' as it were for each item on the list. a text lable that is displayed to the user, and an underlying 'value' that is returned in the HTTP request when that list item is selected. I think you are confusing the two. Try looking at the actual HTML for the selection list and you'll see both the text 'label' of the list item, and the displayed value. To select the n'th element in the list use brower.select_list (:name,FacsimileSearchControl1:FromDateDropdownlist).select_item_in_select_list (:index, n) potentially you might have to use n-1 I'm told that firewatir uses 'zero based' index counting, where Watir is 'one based', but I don't know if this is one of those cases where watir and firewatir are still different or not. On Aug 26, 5:35 pm, Doodle jeffrey.eman...@gmail.com wrote: Thanks for your response, Chuck. I tried clearing the selection first, and that didn't seem to make a difference. The changing of the dropdown box does in fact trigger a postback: onchange=javascript:setTimeout('__doPostBack (\'FacsimileSearchControl1$FromDateDropdownlist\',\'\')', 0) I am afraid I'm a bit out of my element in understanding this part. I tried adding the sleep commands in as well, and that didn't help either. The thing that confuses me is that, when you manually open the site (which, btw, is a public site for looking at detailed reports about banks), the dropdown list is populated with dates, such as 06/31/2009. Yet, when I load up the options of the dropdown into an array and put that out, the array contains these values: 91 111 98 106 101 99 116 32 72 84 77 76 79 I assume these values somehow drive the javascript which populates the dropdown. But I have not figured out a way to simply get at the nth element in the dropdown. Do you have any ideas? I really appreciate the help! On Aug 24, 11:41 am, Chuck van der Linden sqa...@gmail.com wrote: Try clearing the current selection, before selecting another value in the selection list. Also since picking the radio button causes the page to re-render (or is it a postback?), you might need to put in a small wait for a second or two after doing that to give the browser a chance to do it's thing before you start populating the search field and ripping through the from-dates The same goes for after firing the onchange, that initiates some kind of re-render or postback (I'd have to be running fiddler to see if it's actually hitting the server) and you might need a allow a little time for that to take place. Have you tried using an IRB session to walk through this manually so you can see what steps are working and what steps are not working? (you'd probably want to omit the loops, but otoh you could use something like puts dropdate.options to see if it's able to get the list of options for the select list you never really indicated what happens when you run the code above (and given the site involved, I'm NOT going to try it for myself ;-) are you getting some kind or error at any point, or is the site just not reacting to the onchange, or what? On Aug 21, 2:40 pm, Doodle jeffrey.eman...@gmail.com wrote: Hi everyone, I'm loving Watir so far but running into a wall with a certain site. The site uses javascript/asp.net to control a drop down list. I have gone crazy trying different things to use select_list, but nothing seems to work. I just want to be able to select the nth element in a dropdown list, but if I look for certain text it won't work, and if I grab the contents and try to set it that way it also doesn't work. I suspect it has to do with using javascript and the fire_event function, but this does not seem to be very well documented. Also, I am a novice ruby code so any tips or feedback in terms of the general coding style would be greatly appreciated. Thanks! Here is a copy of the code I'm using, presented below the line. 'C:\BankData\failedbankcertcodes.txt' is a txt file containing just these lines: 26870 26535 28344 27011 33901 34194 34881 23556 22574 18659 34043 32069 34341 27367 23124 35469 _ require 'firewatir' require 'rubygems' require 'ftools' include FireWatir ff=Firefox.new certlist='C:\BankData\failedbankcertcodes.txt' File.readlines(certlist).each do |line| urlstring =https://cdr.ffiec.gov/public/ManageFacsimiles.aspx; ff.goto(urlstring) ff.radio(:name, FacsimileSearchControl1:identifierRButton).set ff.select_list(:name,FacsimileSearchControl1:uniqueIDDropdown).select (FDIC Certificate Number) ff.text_field(:name, FacsimileSearchControl1:uniqueIDTextBox).set line datedrop=ff.select_list (:name,FacsimileSearchControl1:FromDateDropdownlist) reportdates=datedrop.options() for i in
[wtr-general] Re: How can I get the attribute in the attached?
As far as right-clicking an element, this is all I have as a reference: http://wiki.openqa.org/display/WTR/Right+Click+an+Element It would still be nice to see the HTML of what you're working with. Are you at least able to click the 'Application List' link? On Aug 27, 6:03 pm, Eason nbkhic...@gmail.com wrote: Dear George, The privious trouble has alreadly been clear, I use the Select Element by Click functon to get the attribute. But then a follow problem come in... In my test page, the drop down list are all div which were created by JS. I used click() method to click the item, but nothing happened, then I use click_no_wait() method, but it did not work yet. At last, I use fire_event() method just as following, but it also did not work! menu.div(:text, 'Internal Control System').fire_event(onMouseOver) menu.div(:text, 'Internal Control System').fire_event(onMouseDown) menu.div(:text, 'Internal Control System').fire_event(onClick) menu.div(:text, 'Internal Control System').fire_event(ondblclick) menu.div(:text, 'Internal Control System').click_no_wait Attached is the drop down list. PS: Is there a method can operate a right click? Eason 2009-08-28 发件人: George 发送时间: 2009-08-28 04:20:26 收件人: Watir General 抄送: 主题: [wtr-general] Re: How can I get the attribute in the attached? What sort of information is the developer toolbar giving you? Have you tried using the :index attribute? On Aug 26, 8:38 pm, Eason nbkhic...@gmail.com wrote: Dear All, Please view the image in the attached. I want to get the arrtibute of the item Quality Management. The drop-down list is a div which is created by javascript, I try to use IE devolep tool to get the attribute of the item, but I find that it is impossible, when I use the tool onfocus to the item, the item will disappear, so I can not fetch the details of this item. Can anyone tell me how to get the attribute? Eason 2009-08-27 截图00.bmp 516KViewDownload 00.JPG 32KViewDownload --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How can I get the attribute in the attached?
Sorry, I meant the 'Application Set' link... On Aug 28, 2:15 pm, George george.sand...@gmail.com wrote: As far as right-clicking an element, this is all I have as a reference: http://wiki.openqa.org/display/WTR/Right+Click+an+Element It would still be nice to see the HTML of what you're working with. Are you at least able to click the 'Application List' link? On Aug 27, 6:03 pm, Eason nbkhic...@gmail.com wrote: Dear George, The privious trouble has alreadly been clear, I use the Select Element by Click functon to get the attribute. But then a follow problem come in... In my test page, the drop down list are all div which were created by JS. I used click() method to click the item, but nothing happened, then I use click_no_wait() method, but it did not work yet. At last, I use fire_event() method just as following, but it also did not work! menu.div(:text, 'Internal Control System').fire_event(onMouseOver) menu.div(:text, 'Internal Control System').fire_event(onMouseDown) menu.div(:text, 'Internal Control System').fire_event(onClick) menu.div(:text, 'Internal Control System').fire_event(ondblclick) menu.div(:text, 'Internal Control System').click_no_wait Attached is the drop down list. PS: Is there a method can operate a right click? Eason 2009-08-28 发件人: George 发送时间: 2009-08-28 04:20:26 收件人: Watir General 抄送: 主题: [wtr-general] Re: How can I get the attribute in the attached? What sort of information is the developer toolbar giving you? Have you tried using the :index attribute? On Aug 26, 8:38 pm, Eason nbkhic...@gmail.com wrote: Dear All, Please view the image in the attached. I want to get the arrtibute of the item Quality Management. The drop-down list is a div which is created by javascript, I try to use IE devolep tool to get the attribute of the item, but I find that it is impossible, when I use the tool onfocus to the item, the item will disappear, so I can not fetch the details of this item. Can anyone tell me how to get the attribute? Eason 2009-08-27 截图00.bmp 516KViewDownload 00.JPG 32KViewDownload --~--~-~--~~~---~--~~ 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 guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---