[wtr-general] FireWatir Read Only Exception
I'm trying to automate a script that will read the FireFox about:config page. To do this I want to put text into the filter textbox, search for it then search the page for a specific string if it's there put a pass if not put a fail and run it to a spread sheet. The problem I am having is I'm being told that the textbox is read only. I can manually type in the textbox and search for values I just can't seem to do it using Firewatir. Has anyone else had any experience with this? Here is my code so far. require 'firewatir' include FireWatir ff=Firefox.new ff.goto('about:config') ff.text_field(:id, 'textbox').set 'browser.chrome.favicons' The error returned for me is `assert_not_readonly': Textfield id and textbox is read only. (Watir::Exception::ObjectReadOnlyException) --~--~-~--~~~---~--~~ 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] Web Page Front End
Has anyone ever tried putting a web page in front of their watir scripts for execution? I'm using rails and can't seem to figure out how to get a method inside of my controller that can open a new page. What I want to do is place a button on a page that when clicked by a user opens an internal web app and logs into it. Hope that makes sense. -- 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 To unsubscribe from this group, send email to watir-general+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
[wtr-general] Web Page Front End
Hello, I am trying to put a web gui in front of my test scripts for execution by other people who have no interest in learning watir. I am running rails for this and am having trouble getting it to launch a web browser. I can create a rails app and run it locally on port 3000, so far I can get that to launch just fine. I added a link on the home page that when clicked I would like for it to launch a new IE browser and use some credentials I am setting to log in. What I am seeing it do is launch a new browser process in the background but then doesn't seem to do anything and I have to kill my mongrel server and manually close the IE processes from Task Manager. Does anyone have any experience adding a web gui in front of their scripts in order to execute them? -- 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 To unsubscribe from this group, send email to watir-general+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
[wtr-general] Re: Web Page Front End
Thanks for your response Bill, I'll check that out, sorry for the late response On Apr 3, 3:23 pm, Bill Agee wrote: > Hi Jeff, > > A while ago I wrote a rails app that does what you describe. > > Until today it was not working with Rails 2.x, but I just fixed that and > uploaded the new version to the Watir wiki: > > http://wiki.openqa.org/display/WTR/Rails+test+runner+example+app > > I've never used this app for any practical purpose, but creating it was fun. > :) > > Thanks > Bill > > On Fri, Mar 26, 2010 at 12:35 PM, jtk wrote: > > Hello, > > > I am trying to put a web gui in front of my test scripts for execution > > by other people who have no interest in learning watir. I am running > > rails for this and am having trouble getting it to launch a web > > browser. I can create a rails app and run it locally on port 3000, so > > far I can get that to launch just fine. I added a link on the home > > page that when clicked I would like for it to launch a new IE browser > > and use some credentials I am setting to log in. What I am seeing it > > do is launch a new browser process in the background but then doesn't > > seem to do anything and I have to kill my mongrel server and manually > > close the IE processes from Task Manager. > > > Does anyone have any experience adding a web gui in front of their > > scripts in order to execute them? > > > -- > > Before posting, please readhttp://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 > > > To unsubscribe from this group, send email to watir-general+ > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > > ME" as the subject. -- 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: Web Page Front End
Bill, just installed runner and it looks great, thank you very much, i think your app will do exactly what i need. jeff On Apr 3, 3:23 pm, Bill Agee wrote: > Hi Jeff, > > A while ago I wrote a rails app that does what you describe. > > Until today it was not working with Rails 2.x, but I just fixed that and > uploaded the new version to the Watir wiki: > > http://wiki.openqa.org/display/WTR/Rails+test+runner+example+app > > I've never used this app for any practical purpose, but creating it was fun. > :) > > Thanks > Bill > > On Fri, Mar 26, 2010 at 12:35 PM, jtk wrote: > > Hello, > > > I am trying to put a web gui in front of my test scripts for execution > > by other people who have no interest in learning watir. I am running > > rails for this and am having trouble getting it to launch a web > > browser. I can create a rails app and run it locally on port 3000, so > > far I can get that to launch just fine. I added a link on the home > > page that when clicked I would like for it to launch a new IE browser > > and use some credentials I am setting to log in. What I am seeing it > > do is launch a new browser process in the background but then doesn't > > seem to do anything and I have to kill my mongrel server and manually > > close the IE processes from Task Manager. > > > Does anyone have any experience adding a web gui in front of their > > scripts in order to execute them? > > > -- > > Before posting, please readhttp://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 > > > To unsubscribe from this group, send email to watir-general+ > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > > ME" as the subject. -- 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] Soap with Savon gem
For a project at work I need the ability to submit transactions using soap calls. I tried searching the group and the only posts I could find were for soap4r. From what I've read soap4r does not work well and I found a gem called savon. Supposedly it's easier and more lightweight than soap4r but I can't find any basic examples of simply submitting a soap request. All the examples I do find are more complicated than this where the writers are trying to do something quite more involved. Can anyone here show me a simple request of submitting a soap request using savon? We are using basic auth no ssl and my soap envelope has no header. Here is the call I am making http://schemas.xmlsoap.org/soap/ envelope/" xmlns:ser="http://service.webservice.com/";> 2010-08-13 2010-08-23 ? ? ? ? CA 93230 DIRECT All I want to do is submit this to an endpoint and capture the response. If someone could show me a simple example I would greatly appreciate it. -- 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: Soap with Savon gem
Thanks for the response Charlie, I'll see if I can get that to work. On Aug 13, 12:00 pm, Charley Baker wrote: > Definitely not a Watir question, more of related to Savon or general ruby > lists. That being said, I've done soap service testing with Soap4R, which > isn't a great library and had considered moving to Savon. It's been a long > time since I looked at it, but hacked together a quick example given the > Savon docs and found this as > well:http://blog.nofail.de/2010/01/savon-handsoap-shootout/ > > Seems pretty trivial to do, here's my quick example from a free soap > webservice: > > require 'rubygems' > require 'savon' > require 'pp' > > client = Savon::Client.new > "http://geocoder.us/dist/eg/clients/GeoCoderPHP.wsdl"; > > response = client.geocode_address do |soapy| > soapy.body = {:location => '1600 Pennsylvania Av, Washington, DC'} > end > pp response.to_hash > > I don't know if that helps, but should give you some start. Savon docs are > pretty good, took 10 minutes from installing the gem to finding a free web > service to writing this. If you see the response back, it's hash within hash > within hash, etc. I'm assuming the same is for input so in your example > something like setting the body to (pseudocode): > > {:from_date => 'whatever', :to_date => 'sometime later', :service_address => > {:address1 => '123'}} etc etc > > should theoretically work. > > Once again, this is unsupported hacky code, you're much better off asking > elsewhere. :) Might make for a good blog post though, hrrrm... :) > > Charley Baker > Lead Developer, Watir,http://watir.com > > On Fri, Aug 13, 2010 at 9:57 AM, jtk wrote: > > For a project at work I need the ability to submit transactions using > > soap calls. I tried searching the group and the only posts I could > > find were for soap4r. From what I've read soap4r does not work well > > and I found a gem called savon. Supposedly it's easier and more > > lightweight than soap4r but I can't find any basic examples of simply > > submitting a soap request. All the examples I do find are more > > complicated than this where the writers are trying to do something > > quite more involved. > > > Can anyone here show me a simple request of submitting a soap request > > using savon? > > > We are using basic auth no ssl and my soap envelope has no header. > > > Here is the call I am making > > > http://schemas.xmlsoap.org/soap/ > > envelope/" xmlns:ser="http://service.webservice.com/";> > > > > > > > > > > 2010-08-13 > > > > 2010-08-23 > > > > > > > > ? > > > > ? > > > > ? > > > > ? > > > > CA > > > > 93230 > > > > > > > > > > DIRECT > > > > > > > > > All I want to do is submit this to an endpoint and capture the > > response. If someone could show me a simple example I would greatly > > appreciate it. > > > -- > > Before posting, please readhttp://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 -- 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] using data from a csv file
Hello, Can anyone help me pull data out of a csv file and insert it into a SQL query? I am trying to create a csv file, read the file, pull data from a specific cell then insert that data into a SQL query and execute the query. I know how to create the file and read it and run SQL inside my script I just can't seem to grab the data out of the file and insert it into my query. Thanks in advance if anyone has any help. Example code would be great. --~--~-~--~~~---~--~~ 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: using data from a csv file
Hi Alex, Thanks for replying. I Googled CSV::Loader and it came back with some message boards talking about it and a few sites that have it to download but they all list it as a plugin for AWB and I found a site that has it listed as a Linux plugin. I am running WATIR in Windows as this is what my company uses. I wasn't able to find a solution by simply Googling CSV::Loader On Feb 12, 12:43 am, Alex Collins wrote: > Do a quick search on Google for CSV::Loader - this will allow you to > load a csv easily. You can then substitute values into your query as > desired. > > On 12 Feb 2009, at 00:53, jtk wrote: > > > > > Hello, > > > Can anyone help me pull data out of a csv file and insert it into a > > SQL query? > > > I am trying to create a csv file, read the file, pull data from a > > specific cell then insert that data into a SQL query and execute the > > query. I know how to create the file and read it and run SQL inside my > > script I just can't seem to grab the data out of the file and insert > > it into my query. > > > Thanks in advance if anyone has any help. Example code would be great. --~--~-~--~~~---~--~~ 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] Creating a header row in excel
Hello, I receive the following error trying to create a new spreadsheet with the following code require 'watir' require 'win32ole' excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Add worksheet = workbook.Worksheets(1) worksheet.SaveAs("spreadsheet.xls") worksheet.range("a1").value = 'Start Time' workbook.save workbook.close excel.Quit The error I get is test.rb:6:in `method_missing': SaveAs (WIN32OLERuntimeError) OLE error code:800A03EC in Microsoft Office Excel Cannot access 'test.xls'. HRESULT error code:0x80020009 Exception occurred. from test.rb:6 I am using excel 2007 and the code I am using is pulled straight from the example on the watir wiki at http://en.wikipedia.org/wiki/Watir#Write_Output_to_Excel_.28as_XLS.29 Has anyone ever encountered this or know what the problem is? --~--~-~--~~~---~--~~ 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: Creating a header row in excel
I've been messing around with this some more and discovered that if I use require 'watir' require 'win32ole' excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Add worksheet = workbook.Worksheets(1) worksheet.SaveAs("\ spreadsheet.xls") worksheet.range("a1").value = "Start Time" workbook.save workbook.close excel.Quit a new file is created but it goes to "My Documents" I have tried putting in ./ or ../ or ../../ (In line 6 worksheet.SaveAs("\ spreadsheet.xls")) and none of these will change the path. For some reason \ will not work and I must use / Does anyone know how I can change the path it saves to? On Mar 23, 2:10 pm, jtk wrote: > Hello, > > I receive the following error trying to create a new spreadsheet with > the following code > > require 'watir' > require 'win32ole' > excel = WIN32OLE::new('excel.Application') > workbook = excel.Workbooks.Add > worksheet = workbook.Worksheets(1) > worksheet.SaveAs("spreadsheet.xls") > worksheet.range("a1").value = 'Start Time' > workbook.save > workbook.close > excel.Quit > > The error I get is > > test.rb:6:in `method_missing': SaveAs (WIN32OLERuntimeError) > OLE error code:800A03EC in Microsoft Office Excel > Cannot access 'test.xls'. > HRESULT error code:0x80020009 > Exception occurred. from test.rb:6 > > I am using excel 2007 and the code I am using is pulled straight from > the example on the watir wiki > athttp://en.wikipedia.org/wiki/Watir#Write_Output_to_Excel_.28as_XLS.29 > > Has anyone ever encountered this or know what the problem is? --~--~-~--~~~---~--~~ 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: Creating a header row in excel
Thanks for the reply Lily, I've tried a couple different things and I just keep getting "ruby: No such file or directory -- creating (LoadError)". I haven't put a lot of investigating into it yet though so I'll keep trying. I appreciate the info. On Mar 27, 12:44 pm, Lily Lou wrote: > Not sure exactly what is going on, but \ is escaping the next character > which in your example is space. > > If you use single quotes that won't happen (unless using variables in the > file name I think.. read below) > > For example > > puts "hi \" " > puts 'hi \" ' > puts "hi /' " > puts "/ spreadsheet" > puts "\spreadsheet" > puts '\spreadsheet' > > Produces results of (let's you see exactly what happens with single quotes, > double quotes and / and \. > puts "hi \" " output: hi " > puts 'hi \" ' output: hi \" > puts "hi /' " output: hi /' > puts "/ spreadsheet" output: / spreadsheet > puts "\spreadsheet" output: preadsheet > puts '\spreadsheet' output: puts '\spreadsheet' > > Also was reading a bit on this blog > posthttp://rubyonwindows.blogspot.com/2007/03/automating-excel-with-ruby-... > > in the comments someone named Brian writes about an issue with \,/,'," > which appears to be similar to your first post. However it does not look > like you were using a variable name substitution name in your filename. > > "One caveat of the following line: > workbook.SaveAs('c:\temp\YourWorkbook.xls') > Notice that you use single quotes so that you can use the \ between > directories. If, however you need variable substitution in your filename, > you *must* use / (unix-like) between your directory > entries.(i.eworkbook.SaveAs("c:/temp/YourWorkbook#{Date.today.to_s}.xls") > I spent quite a bit of time with this, thinking that I spelled the > name SaveAS wrong. The error (at least in my case) was method_missing from > Win32::OLE, which was very misleading." > > Hope that helps.. > > On Mon, Mar 23, 2009 at 5:26 PM, jtk wrote: > > > I've been messing around with this some more and discovered that if I > > use > > > require 'watir' > > require 'win32ole' > > excel = WIN32OLE::new('excel.Application') > > workbook = excel.Workbooks.Add > > worksheet = workbook.Worksheets(1) > > worksheet.SaveAs("\ spreadsheet.xls") > > worksheet.range("a1").value = "Start Time" > > workbook.save > > workbook.close > > excel.Quit > > > a new file is created but it goes to "My Documents" I have tried > > putting in ./ or ../ or ../../ (In line 6 worksheet.SaveAs("\ > > spreadsheet.xls")) and none of these will change the path. For some > > reason \ will not work and I must use / > > > Does anyone know how I can change the path it saves to? > > > On Mar 23, 2:10 pm, jtk wrote: > > > Hello, > > > > I receive the following error trying to create a new spreadsheet with > > > the following code > > > > require 'watir' > > > require 'win32ole' > > > excel = WIN32OLE::new('excel.Application') > > > workbook = excel.Workbooks.Add > > > worksheet = workbook.Worksheets(1) > > > worksheet.SaveAs("spreadsheet.xls") > > > worksheet.range("a1").value = 'Start Time' > > > workbook.save > > > workbook.close > > > excel.Quit > > > > The error I get is > > > > test.rb:6:in `method_missing': SaveAs (WIN32OLERuntimeError) > > > OLE error code:800A03EC in Microsoft Office Excel > > > Cannot access 'test.xls'. > > > HRESULT error code:0x80020009 > > > Exception occurred. from test.rb:6 > > > > I am using excel 2007 and the code I am using is pulled straight from > > > the example on the watir wiki athttp:// > > en.wikipedia.org/wiki/Watir#Write_Output_to_Excel_.28as_XLS.29 > > > > Has anyone ever encountered this or know what the problem is? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---