[wtr-general] Re: Sending mail with a attachment
If you can search more in the group, you can get more you want. Few weeks ago, I have asked the same question. I don't know whether you can access the post or not: https://mail.google.com/mail/?zx=3a1ipdi1bgm4shva=1#sent/121b152d08b7ea8e Thanks. Wesley Chen. On Wed, Jun 24, 2009 at 1:14 PM, Chethan chethan2...@gmail.com wrote: Any one Pls help me out to send a report mail. On Jun 23, 2:46 pm, Chethan chethan2...@gmail.com wrote: Hi Every one, I am trying to send out the Test Resultattachmentusing ruby. Before posting my question I checked all the ways tried with ruby rails method Ruby mailfactory method. but I am unsuccessful. I am trying to send out themailusing google appsmailserver. So in this case its secure, the port no the domain every thing changes. As I found out in the net I made changes. started getting `check_response': 530 5.7.0 Must issue a STARTTLS Error. couldn't go further. Pls help me out on this. Can any body give me some solution forsendingout themail. Thanks in advance, Chethan --~--~-~--~~~---~--~~ 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] Freenode has blocked the Mibbit client
Our #watir IRC channel does not work on Mibbit any more, and it looks like it will never work again. http://blog.mibbit.com/?p=306 http://blog.freenode.net/2009/06/new-freenode-webchat-and-why-to-use-it/ We can use Freenode web client from now on. Anybody has the time to update wiki page? http://wiki.openqa.org/display/WTR/The+IRC+Channel Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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 to click on Ok of a pop-up message window
Hi, I did the following changes but then also not bale to click on the OK button. Please suggest if I am wrong. IE version I was using is 6.So I did the following steps- 1 changed the title on the JS Alert box in WinClicker.rb file IE6 = Microsoft Internet Explorer 2 Made changes to the script require 'watir' include Watir def check_for_popups(title=Microsoft Internet Explorer, button=OK) popup=Thread.new { autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,60) if (ret==1) puts There is popup. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end elsif (ret==0) puts No popup end } at_exit { Thread.kill(popup) } end $ie = Watir::IE.new $ie.goto(http://localhost/new;) $ie.text_field(:name, userName).set(user1) $ie.text_field(:name, password).set(password) $ie.button(:value, Login).click $ie.link(:text, Manage Products).click $ie.link(:text, Create Product).click $ie.text_field(:name, productName).set('Test') $ie.text_field(:name, description).set('Test1') $ie.button(:name, submit_btn).click check_for_popups(Microsoft Internet Explorer, OK) Thanks Maumita On Jun 23, 9:14 pm, orde ohil...@gmail.com wrote: Check these pages out: http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups orde On Jun 23, 5:24 am, Maumita maumita.majum...@gmail.com wrote: Hi, I am facing a problem. I had written a script that submit a form.Befor submitting the form,if any field entry is missing in the form then a java pop-up window appears. Windows title -Microsoft Internet Explorer Prompt Message - 'You have not selected an image.Do you want to continue'. This window has Ok and cancel button. when user clicks on Ok the form automatically gets submitted. I don't know how to click on the OK button when the pop up window appears. Please suggest me. Below is my script - require 'watir' require 'win32ole' 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.WorkSheets($sheet_id) $worksheet.Select ie = Watir::IE.new #Navigate to dportal ie.goto(http://test/new;) ie.text_field(:name, userName).set() ie.text_field(:name, password).set() ie.button(:value, Login).click ie.link(:text, Manage Products).click ie.link(:text, Create Product).click ie.text_field(:name, productName).set $worksheet.Range(a# {i}).value ie.text_field(:name, description).set $worksheet.Range(b# {i}).value ie.text_field(:name, copyright).set $worksheet.Range(c# {i}).value ie.text_field(:name, 'releaseDate').value= $worksheet.Range(d# {i}).value #ie.fileField(:name, imageFile).set $worksheet.Range(f# {i}).value ie.select_list(:name, vendor).select $worksheet.Range(e# {i}).value ie.select_list(:name, instrument).select $worksheet.Range(f# {i}).value ie.select_list(:name, cds).select $worksheet.Range(g# {i}).value ie.checkbox(:name, isPublished).set ie.text_field(:name, productCosts[0].cost).value= $worksheet.Range(h#{i}).value ie.button(:name, submit_btn).click_no_wait Thanks Maumita --~--~-~--~~~---~--~~ 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 to click on Ok of a pop-up message window
change $ie.button(:name, submit_btn).click to $ie.button(:name, submit_btn).click_no_wait and try again. -Camael 发件人: Maumita 发送时间: 2009-06-24 17:50:06 收件人: Watir General 抄送: 主题: [wtr-general] Re: How to click on Ok of a pop-up message window Hi, I did the following changes but then also not bale to click on the OK button. Please suggest if I am wrong. IE version I was using is 6.So I did the following steps- 1 changed the title on the JS Alert box in WinClicker.rb file IE6 = Microsoft Internet Explorer 2 Made changes to the script require 'watir' include Watir def check_for_popups(title=Microsoft Internet Explorer, button=OK) popup=Thread.new { autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,60) if (ret==1) puts There is popup. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end elsif (ret==0) puts No popup end } at_exit { Thread.kill(popup) } end $ie = Watir::IE.new $ie.goto(http://localhost/new;) $ie.text_field(:name, userName).set(user1) $ie.text_field(:name, password).set(password) $ie.button(:value, Login).click $ie.link(:text, Manage Products).click $ie.link(:text, Create Product).click $ie.text_field(:name, productName).set('Test') $ie.text_field(:name, description).set('Test1') $ie.button(:name, submit_btn).click check_for_popups(Microsoft Internet Explorer, OK) Thanks Maumita On Jun 23, 9:14爌m, orde ohil...@gmail.com wrote: Check these pages out: http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups orde On Jun 23, 5:24燼m, Maumita maumita.majum...@gmail.com wrote: Hi, I am facing a problem. I had written a script that submit a form.Befor submitting the form,if any field entry is missing in the form then a java pop-up window appears. Windows title -Microsoft Internet Explorer Prompt Message - 'You have not selected an image.Do you want to continue'. This window has Ok and cancel button. when user clicks on Ok the form automatically gets submitted. I don't know how to click on the OK button when the pop up window appears. Please suggest me. Below is my script - require 'watir' require 'win32ole' 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.WorkSheets($sheet_id) ??$worksheet.Select ie = Watir::IE.new #Navigate to dportal ie.goto(http://test/new;) ie.text_field(:name, userName).set() ie.text_field(:name, password).set() ie.button(:value, Login).click ie.link(:text, Manage Products).click ie.link(:text, Create Product).click ???ie.text_field(:name, productName).set $worksheet.Range(a# {i}).value ???ie.text_field(:name, description).set $worksheet.Range(b# {i}).value ???ie.text_field(:name, copyright).set $worksheet.Range(c# {i}).value ???ie.text_field(:name, 'releaseDate').value= $worksheet.Range(d# {i}).value ???#ie.fileField(:name, imageFile).set $worksheet.Range(f# {i}).value ???ie.select_list(:name, vendor).select $worksheet.Range(e# {i}).value ???ie.select_list(:name, instrument).select $worksheet.Range(f# {i}).value ???ie.select_list(:name, cds).select $worksheet.Range(g# {i}).value ???ie.checkbox(:name, isPublished).set ???ie.text_field(:name, productCosts[0].cost).value= $worksheet.Range(h#{i}).value ???ie.button(:name, submit_btn).click_no_wait 燭hanks Maumita --~--~-~--~~~---~--~~ 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] Firewatir - Solution of can't get sub frames
Senario: Get sub frames iframe iframe../iframe iframe../iframe /iframe Issue1. Firewatir has no get frames collection function: Add frames() class Document def frames return Frames.new(@container) end end Also add documet()function and attribute TAG for Frame class -- module FireWatir class Frame Element def document Document.new(self) end TAG = 'IFRAME' end end -- Issue2. It always returns the top level frames not the subframes when calling frames()= Rewrite ElementCollections.locate_tagged_elements() funciton. - class ElementCollections def locate_tagged_elements(tag, types = []) # generate array to hold results result_name = arr_coll_#{tag}_#{@@current_level} jssh_command = var #{result_name}=new Array(); if types.include?(textarea) || types.include?(button) search_tag = '*' else search_tag = tag end # generate array of elements matching the tag if @container.class == FireWatir::Firefox || @container.class == FireWatir::Frame tag.upcase != IFRAME elements_tag = elements_#{tag} container_name = DOCUMENT_VAR jssh_command += var #{elements_tag} = null; jssh_command += #{elements_tag} = # {container_name}.getElementsByTagName(\#{search_tag}\); elsif @container.class == FireWatir::Frame tag.upcase == IFRAME elements_tag = elements_#{@@current_level}_#{tag} container_name = #...@container.element_name} jssh_command += var #{elements_tag} = null; jssh_command += #{elements_tag} = # {container_name}.contentWindow.frames; else elements_tag = elements_#{@@current_level}_#{tag} container_name = #...@container.element_name} jssh_command += var #{elements_tag} = null; jssh_command += #{elements_tag} = # {container_name}.getElementsByTagName(\#{search_tag}\); end # generate array containing results if types.empty? jssh_command += #{result_name} = #{elements_tag}; else # generate types array jssh_command += var types = new Array( types.each_with_index do |type, count| jssh_command += , unless count == 0 jssh_command += \#{type}\ end jssh_command += ); # check the type of each element jssh_command += for(var i=0; i#{elements_tag}.length; i++) { var element = #{elements_tag}[i]; var same_type = false; for(var j=0; jtypes.length; j++) { if(types[j] == element.type || types[j] == element.tagName) { same_type = true; break; } } if(same_type) { #{result_name}.push(element); } }; end jssh_command += #{result_name}.length; # Remove \n that are there in the string as a result of pressing enter while formatting. jssh_command.gsub!(/\n/, ) #puts jssh_command jssh_socket.send(#{jssh_command};\n, 0) length = read_socket().to_i; puts jssh_command puts elements length is in locate_tagged_elements is : #{length} elements = (0...length).collect {|i| #{result_name}[#{i}]} @@current_level = @@current_level + 1 return elements end private :locate_tagged_elements end -- ==How to use it innerframes = ff.frame(a).document.frames --~--~-~--~~~---~--~~ 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 to click on Ok of a pop-up message window
Thanks for the help.It solves my problem On Jun 24, 2:56 pm, Ye Jian j...@cn.ufinity.com wrote: change $ie.button(:name, submit_btn).click to $ie.button(:name, submit_btn).click_no_wait and try again. -Camael 发件人: Maumita 发送时间: 2009-06-24 17:50:06 收件人: Watir General 抄送: 主题: [wtr-general] Re: How to click on Ok of a pop-up message window Hi, I did the following changes but then also not bale to click on the OK button. Please suggest if I am wrong. IE version I was using is 6.So I did the following steps- 1 changed the title on the JS Alert box in WinClicker.rb file IE6 = Microsoft Internet Explorer 2 Made changes to the script require 'watir' include Watir def check_for_popups(title=Microsoft Internet Explorer, button=OK) popup=Thread.new { autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,60) if (ret==1) puts There is popup. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end elsif (ret==0) puts No popup end } at_exit { Thread.kill(popup) } end $ie = Watir::IE.new $ie.goto(http://localhost/new;) $ie.text_field(:name, userName).set(user1) $ie.text_field(:name, password).set(password) $ie.button(:value, Login).click $ie.link(:text, Manage Products).click $ie.link(:text, Create Product).click $ie.text_field(:name, productName).set('Test') $ie.text_field(:name, description).set('Test1') $ie.button(:name, submit_btn).click check_for_popups(Microsoft Internet Explorer, OK) Thanks Maumita On Jun 23, 9:14爌m, orde ohil...@gmail.com wrote: Check these pages out: http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/disp... orde On Jun 23, 5:24燼m, Maumita maumita.majum...@gmail.com wrote: Hi, I am facing a problem. I had written a script that submit a form.Befor submitting the form,if any field entry is missing in the form then a java pop-up window appears. Windows title -Microsoft Internet Explorer Prompt Message - 'You have not selected an image.Do you want to continue'. This window has Ok and cancel button. when user clicks on Ok the form automatically gets submitted. I don't know how to click on the OK button when the pop up window appears. Please suggest me. Below is my script - require 'watir' require 'win32ole' 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.WorkSheets($sheet_id) ??$worksheet.Select ie = Watir::IE.new #Navigate to dportal ie.goto(http://test/new;) ie.text_field(:name, userName).set() ie.text_field(:name, password).set() ie.button(:value, Login).click ie.link(:text, Manage Products).click ie.link(:text, Create Product).click ???ie.text_field(:name, productName).set $worksheet.Range(a# {i}).value ???ie.text_field(:name, description).set $worksheet.Range(b# {i}).value ???ie.text_field(:name, copyright).set $worksheet.Range(c# {i}).value ???ie.text_field(:name, 'releaseDate').value= $worksheet.Range(d# {i}).value ???#ie.fileField(:name, imageFile).set $worksheet.Range(f# {i}).value ???ie.select_list(:name, vendor).select $worksheet.Range(e# {i}).value ???ie.select_list(:name, instrument).select $worksheet.Range(f# {i}).value ???ie.select_list(:name, cds).select $worksheet.Range(g# {i}).value ???ie.checkbox(:name, isPublished).set ???ie.text_field(:name, productCosts[0].cost).value= $worksheet.Range(h#{i}).value ???ie.button(:name, submit_btn).click_no_wait 燭hanks Maumita --~--~-~--~~~---~--~~ 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.com now available
Nice work on the site Alister. It looks great. Thanks for taking this on. -c On Wed, Jun 24, 2009 at 5:33 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: It looks great. :) Alister and I are recording a podcast about watir.com in the next few days, so if you have a question for the podcast, sent it here. Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---