Re: [wtr-general] Automating actions in canvas using watir
Thanks Oscar, I will check this out. On Wed, Jul 11, 2012 at 11:10 PM, Oscar Rieken wrote: > here is an example using selenium-webdriver > > you can do the same with watir-webdriver > > > http://www.youtube.com/watch?v=yugolxP3rhc&feature=plcp > > https://github.com/davehunt/selenicopterpilot > > On Wed, Jul 11, 2012 at 1:33 PM, Shiv wrote: > >> Hello, >> >> I am working on social games that uses html5 & javascript technology, it >> is supported on multiple platforms and browsers. My problem is, every time >> we have a new game, it needs to be tested on all the platforms that >> includes desktops+browsers and devices(browsers+native). It is time >> consuming, because there are multiple iterations or builds for each game. >> >> These games are rendered within the canvas element provided in html5. >> Within the canvas, user does different actions to interact with the game, >> but for watir or selenium canvas is a black box. >> >> Is there any way to automate these events/actions within canvas using >> watir? >> >> If not,can the developers provide any testability to automate? >> >> regards, >> Shiv >> >> -- >> Before posting, please read http://watir.com/support. In short: search >> before you ask, be nice. >> >> watir-general@googlegroups.com >> http://groups.google.com/group/watir-general >> watir-general+unsubscr...@googlegroups.com >> > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Automating actions in canvas using watir
Hello, I am working on social games that uses html5 & javascript technology, it is supported on multiple platforms and browsers. My problem is, every time we have a new game, it needs to be tested on all the platforms that includes desktops+browsers and devices(browsers+native). It is time consuming, because there are multiple iterations or builds for each game. These games are rendered within the canvas element provided in html5. Within the canvas, user does different actions to interact with the game, but for watir or selenium canvas is a black box. Is there any way to automate these events/actions within canvas using watir? If not,can the developers provide any testability to automate? regards, Shiv -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] maximize IE doesn't work
Thanks, I downgraded ffi gem to ffi-1.0.9-x86-mingw32, now maximize works. On Tue, Nov 8, 2011 at 1:32 AM, John Fitisoff wrote: > Out of curiosity I googled, found this, maybe related > > > http://stackoverflow.com/questions/7964778/no-such-file-to-load-ffi-c-loaderror > > > -- > *From:* Shiv > *To:* watir-general@googlegroups.com > *Sent:* Monday, November 7, 2011 5:16 AM > *Subject:* [wtr-general] maximize IE doesn't work > > Hi, > > I am using > > IE8 + windows7 + watir (2.0.4) + ruby 1.8.7 (2010-08-16 patchlevel 302) > [i386-mingw32] + rautomation 0.6.3 > > when I run the test I want to maximize the browser, this is the error when > i run this code, error is thrown for ie.maximize > > # > require 'rubygems' > require 'watir' > > Watir::Browser.default = 'ie' > ie = Watir::Browser.start(www.google.com) > sleep 3 > ie.maximize > > ## > > > C:\Ruby187\bin>ruby.exe D:\example.rb > C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `gem_original > _require': no such file to load -- ffi_c (LoadError) > from > C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require' > from > C:/Ruby187/lib/ruby/gems/1.8/gems/ffi-1.0.10-x86-mingw32/lib/ffi.rb > :11 > from > C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `gem_original_require' > from > C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require' > from > C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.6.3/lib/rautomation > /adapter/win_ffi.rb:6 > from > C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.6.3/lib/rautomation > /window.rb:66:in `const_get' > from > C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.6.3/lib/rautomation > /window.rb:66:in `initialize' > from > C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/ie-class.rb > :486:in `new' > from > C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/ie-class.rb > :486:in `rautomation' > from > C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/ie-class.rb > :457:in `maximize' > from D:/example.rb:16 > > > my gem list: > C:\Ruby187\bin>gem list > *** LOCAL GEMS *** > builder (3.0.0) > commonwatir (2.0.4, 2.0.3) > ffi (1.0.10 x86-mingw32) > hoe (2.12.3) > nokogiri (1.5.0 x86-mingw32) > rake (0.9.2.2) > rautomation (0.6.3, 0.6.1) > rubygems-update (1.8.11) > s4t-utils (1.0.4) > user-choices (1.1.6.1) > watir (2.0.4) > win32-api (1.4.8 x86-mingw32) > win32-process (0.6.5) > windows-api (0.4.0) > windows-pr (1.2.1) > xml-simple (1.1.1) > can you please help > > Thanks, > Shiv > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] maximize IE doesn't work
Hi, I am using IE8 + windows7 + watir (2.0.4) + ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32] + rautomation 0.6.3 when I run the test I want to maximize the browser, this is the error when i run this code, error is thrown for ie.maximize # require 'rubygems' require 'watir' Watir::Browser.default = 'ie' ie = Watir::Browser.start(www.google.com) sleep 3 ie.maximize ## C:\Ruby187\bin>ruby.exe D:\example.rb C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original _require': no such file to load -- ffi_c (LoadError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/ffi-1.0.10-x86-mingw32/lib/ffi.rb :11 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.6.3/lib/rautomation /adapter/win_ffi.rb:6 from C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.6.3/lib/rautomation /window.rb:66:in `const_get' from C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.6.3/lib/rautomation /window.rb:66:in `initialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/ie-class.rb :486:in `new' from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/ie-class.rb :486:in `rautomation' from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.4/lib/watir/ie-class.rb :457:in `maximize' from D:/example.rb:16 my gem list: C:\Ruby187\bin>gem list *** LOCAL GEMS *** builder (3.0.0) commonwatir (2.0.4, 2.0.3) ffi (1.0.10 x86-mingw32) hoe (2.12.3) nokogiri (1.5.0 x86-mingw32) rake (0.9.2.2) rautomation (0.6.3, 0.6.1) rubygems-update (1.8.11) s4t-utils (1.0.4) user-choices (1.1.6.1) watir (2.0.4) win32-api (1.4.8 x86-mingw32) win32-process (0.6.5) windows-api (0.4.0) windows-pr (1.2.1) xml-simple (1.1.1) can you please help Thanks, Shiv -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Watir Book
Congrats...its a great initiative good luck, shiv On Tue, Mar 15, 2011 at 5:42 AM, Željko Filipin wrote: > Hi, > > I have started writing a book on Watir. My family has agreed that I can work > on the book for about 8 hours almost every Saturday. > > The source (markdown) will always be free at Github[1] and I plan to sell > the pdf for $9. I know I will not get rich by writing a book on Watir, but > some money would be nice. > > Version 0.1.1 of the pdf is available now[2], for free. > > If you think there needs to be a book on Watir, and you think I am the right > person to write it, feel free to buy the book now[3]. You will get all > updates to the book for free. (Well, version 0.1.1 can be downloaded for > free anyway.) > > I promise I will not take the money, spend it on beer and never write the > book. :) > > If I see I will not finish the book, I will return the money. Also, if you > buy the book and you do not like it, I will return the money. > > If you like the idea, but do not have $9, feel free to send any amount to > zeljko.fili...@gmail.com via Paypal. You can also donate to the book via > Flattr[4]. I appreciate any amount. > > Željko > -- > [1] https://github.com/zeljkofilipin/watirbook > [2] https://github.com/zeljkofilipin/watirbook/downloads > [3] > https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVJATC56MJS3N > [4] https://flattr.com/thing/147956/Watir-Book > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Call to Arms :)
Hey Charley, I am already using Watir + Rasta for data driven test automation for my application. out of curiosity I have checked the cheesy link you sent to group. few question I have: can I use watir+rasta+taza ? what are the main features of taza framework? Thanks and Regards, Shiv On Tue, Nov 16, 2010 at 8:28 PM, Charley Baker wrote: > I went through a couple of iterations of frameworks over the years > with the result of lessons learned being designed into Taza. With over > 70 testers adding code, I definitely experienced the pain of > maintainability which Taza, and other practices were finally able to > solve, so I feel your pain. :) > > Taza has partials for page areas like headers, footers, search, etc > that show up on multiple pages. > > Cheers, > > Charley Baker > Lead Developer, Watir, http://watir.com > > > > On Mon, Nov 15, 2010 at 7:26 PM, George wrote: > > One question about Taza: Would this framework be effective for testing > > the same functionality across multiple pages? IOW, if there is a > > search feature that needs to be tested, but can be found on multiple > > pages, would Taza work for my needs? > > > > Thanks, > > > > George > > > > > > > > On Nov 15, 5:59 pm, George wrote: > >> Hi Charley, > >> > >> I might need to talk to you. As I've been learning Watir, I steered > >> away from established frameworks (frankly, out of my lack of > >> understanding) and developed my own framework which included HTML > >> reporting. However, as the number of tests have been increasing and > >> gaining more visibility to others within my team, I'm finding that > >> it's become more difficult to maintain. > >> > >> So, I might need to (gulp) re-structure my tests. I still need to > >> talk to my boss about this, but I'll take a look at those links and > >> develop some simple tests. Hopefully, this will inspire me to adhere > >> to already-established frameworks. > >> > >> -George > >> > >> On Nov 15, 1:34 pm, Charley Baker wrote: > >> > >> > >> > >> > >> > >> > >> > >> > This might help some of you and definitely worth checking out : > http://www.cheezyworld.com/ He has a couple of pages now on cucumber > >> > and browser testing, developing a page based framework. Tazahttps:// > github.com/scudco/tazaisa framework I've architected and > >> > used in several large companies, which has many of the same concepts > >> > that people are moving towards - e.g. page and site models. Please do > >> > check these out, use them and try not to reinvent your own framework. > >> > >> > Ruby has builtin support for a base test library - a few of us have > >> > added additional test frameworks on top of that which are used in > >> > heavy large scale application testing with AJAX and all the goodness > >> > from years of experience. Cheezy's posts are a build up of real life > >> > experience using Watir and Cucumber on various client sites. I'd > >> > highly recommend following them, there are several more coming. > >> > >> > I'll drop a hint, Taza is an awesome framework for web ui testing, > >> > well used and also extensible. If you want to get involved in either > >> > Taza or Watir, we've got a lot of work to do, and I'm happy to mentor > >> > from the newbie on up. > >> > >> > Cheers, > >> > >> > Charley > > > > -- > > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > > > watir-general@googlegroups.com > > http://groups.google.com/group/watir-general > > watir-general+unsubscr...@googlegroups.com > > > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Need help to capture a string from the action attribute
Thank you orde...it works On Tue, Nov 16, 2010 at 2:40 AM, orde wrote: > You should be able to capture the action attribute like this: > > action_attribute = @browser.form(:name, "mainForm").action > > Hope it helps. > > orde > > On Nov 15, 8:20 am, Shiv wrote: > > Hello, > > > > This is my html: > > > > > method="post" old_onsubmit="null" _sfm_form_name="mainForm" > > show_errors_together="true"> > > > > I am using rasta and watir for data driven testing. I want to capture > this > > url in the above html and compare with the url which I get from excel > using > > Rasta to pass my test. > > > > *Problem I am facing is * > > > > I want the action variable in the below watir code to store the string > using > > the action attribute in form element, I have tried with different > > combinations but was unsuccessful > > > > This is my watir code: > > > > def error? > > trigger_link > > action = @@ie.form(:xpath, "//fo...@action']") > > if (@page_name == action) > > puts "#...@page_name} page is available" > > return 0 > > else > > puts "#...@page_name} page is not available" > > return 1 > > end > > end > > def trigger_link > > @@ie.link(:text, @link_name).click > > end > > > > I want the action variable to store the string using the action attribute > in > > form element, I have tried with different combinations but was > unsuccessful > > any help is greatly appreciated > > > > Regards, > > Shiv > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Need help to capture a string from the action attribute
Hello, This is my html: I am using rasta and watir for data driven testing. I want to capture this url in the above html and compare with the url which I get from excel using Rasta to pass my test. *Problem I am facing is * I want the action variable in the below watir code to store the string using the action attribute in form element, I have tried with different combinations but was unsuccessful This is my watir code: def error? trigger_link action = @@ie.form(:xpath, "//fo...@action']") if (@page_name == action) puts "#...@page_name} page is available" return 0 else puts "#...@page_name} page is not available" return 1 end end def trigger_link @@ie.link(:text, @link_name).click end I want the action variable to store the string using the action attribute in form element, I have tried with different combinations but was unsuccessful any help is greatly appreciated Regards, Shiv -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] javscript popup - confirmation window
Hi Charley, Your suggestion works I have passed the browser variable in the click method and changed $ie to ie I have experiemented a bit and also found one more way this script works, i appended $ to all ie occurrences in the script what is the difference in both these solutions? Thanks, Shiv On Thu, Oct 28, 2010 at 12:19 AM, Charley Baker wrote: > You're using ie in your test, but $ie in the method. You might want to > change the method signature to pass in the browser: > def startClicker( browser, button , waitTime= 9, user_input=nil ) > # get a handle if one exists > hwnd = browser.enabled_popup(waitTime) > . > > > hth, > Charley Baker > Lead Developer, Watir, http://watir.com > > > > On Wed, Oct 27, 2010 at 6:31 AM, Shiv wrote: > > My form.rb: > > > > require "watir" > > require "test/unit" > > require 'watir/winClicker' > > require 'watir\contrib\enabled_popup' > > > > #this is the code i got from help forums for javascript popup > > def startClicker( button , waitTime= 9, user_input=nil ) > > # get a handle if one exists > > hwnd = $ie.enabled_popup(waitTime) > > if (hwnd) # yes there is a popup > > w = WinClicker.new > > if ( user_input ) > > w.setTextValueForFileNameField( hwnd, "#{user_input}" ) > > end > > # I put this in to see the text being input it is not necessary to > work > > > > # "OK" or whatever the name on the button is > > w.clickWindowsButton_hwnd( hwnd, "#{button}" ) > > puts ("Pop up button is: #{button}") > > sleep 2 > > > > # this is just cleanup > > w=nil > > end > > end > > > > Problem description: > > I am using a web based javascript form, after i fill up all fields, i > click > > on save and then i get a javascript popup which has "OK" button on it as > a > > confirmation. > > I am not able to click the ok button on this popup...I ve searched and > got > > the code, but not able to make it work. > > > > code where the problem is: > > ie.button(:name, 'save').click_no_wait > > startClicker("OK" , 5) > > > > error after I run: > >>ruby CP_form.rb > > CP_form.rb:10:in `startClicker': undefined method `enabled_popup' for > > nil:NilClass (NoMethodError) > > from CP_form.rb:66 > > > > can someone show me the way from here pls > > > > Thanks, > > Shiv > > > > -- > > Before posting, please read http://watir.com/support. In short: search > > before you ask, be nice. > > > > watir-general@googlegroups.com > > http://groups.google.com/group/watir-general > > watir-general+unsubscr...@googlegroups.com > > > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] javscript popup - confirmation window
*My form.rb:* require "watir" require "test/unit" require 'watir/winClicker' require 'watir\contrib\enabled_popup' *#this is the code i got from help forums for javascript popup* def startClicker( button , waitTime= 9, user_input=nil ) # get a handle if one exists hwnd = $ie.enabled_popup(waitTime) if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField( hwnd, "#{user_input}" ) end # I put this in to see the text being input it is not necessary to work # "OK" or whatever the name on the button is w.clickWindowsButton_hwnd( hwnd, "#{button}" ) puts ("Pop up button is: #{button}") sleep 2 # this is just cleanup w=nil end end *Problem description:* I am using a web based javascript form, after i fill up all fields, i click on save and then i get a javascript popup which has "OK" button on it as a confirmation. I am not able to click the ok button on this popup...I ve searched and got the code, but not able to make it work. *code where the problem is:* ie.button(:name, 'save').click_no_wait startClicker("OK" , 5) *error after I run:* >ruby CP_form.rb CP_form.rb:10:in `startClicker': undefined method `enabled_popup' for nil:NilClass (NoMethodError) from CP_form.rb:66 can someone show me the way from here pls Thanks, Shiv -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: WIN32OLE.Open - runtime error
Hi chuck, Thx for the info I have done what you have suggested but it doesn't help. I get same error my script fails in the second line itself, I get a runtime error from WINN32OLE...is it something to do with watir version I am using? my watir version is watir-1.6.5 require 'win32ole' excel = WIN32OLE::new('excel.application') excel.visible = true wb = excel.Workbooks.Open('D:\\shiv.xls') Shiv On Thu, Jul 8, 2010 at 9:22 PM, Chuck van der Linden wrote: > Backslash is the 'escaping' character in ruby, for example to insert > a single quote as part of a single quoted string you would do > > s='that\'s the answer' > > If you : puts s > you would get: that's the answer > > Similarly it would be used to insert a double-quote inside a double > quoted string. > > So the end result is that \ is always seen as an escaping charcter, no > matter what kind of quotes you are enclosing the string in. > > To get a single \ inside a string you need to double it > > try > > excel.Workbooks.Open('D:\\shiv.xls') > > reading this might help your understanding, > http://www.ruby-forum.com/topic/130674 > > > On Jul 8, 8:12 am, Shiv wrote: > > sorry,I did not get you...because what you are suggesting already > exists..I > > mean my excel file shiv.xls is already in D-drive, I have used single > > quotes..you want me to use double quotes ? I have already done that it > > doesnt help > > > > > > > > On Thu, Jul 8, 2010 at 7:11 PM, SMF SMF wrote: > > > excel.Workbooks.Open(''D:\shiv.xls'') - change this line also and make > > > shiv.xls exist in D-drive > > > > > On Thu, Jul 8, 2010 at 6:55 PM, Basim Baassiri > wrote: > > > > >> is the d drive that you are specifying a network share? also, does the > > >> file exist with the correct spelling > > > > >> Basim > > > > >> On Thu, Jul 8, 2010 at 8:08 AM, Shiv wrote: > > > > >>> Thanks, BUT i get same error, I changed the 2nd line to > > > > >>> excel = WIN32OLE::new('excel.application') > > >>> On Thu, Jul 8, 2010 at 5:09 PM, SMF SMF >wrote: > > > > >>>> Change 2nd line to as below- > > > > >>>> excel = WIN32OLE::new('excel.application') > > > > >>>> On Thu, Jul 8, 2010 at 5:00 PM, Shiv wrote: > > > > >>>>> Hello, > > > > >>>>> I am trying to open a excel file and write data, but i m getting > > >>>>> runtime error > > >>>>> I checked the path is correct > > >>>>> new method works fine but open method throws error...can u pls help > me > > >>>>> figure out this problem > > > > >>>>> *Code:* > > >>>>> require 'win32ole' > > >>>>> excel = WIN32OLE.new('excel.application') > > >>>>> excel.visible = true > > >>>>> excel.Workbooks.Open('D:\shiv.xls') > > >>>>> excel.range('A1').value = 'Hello, world.' > > >>>>> excel.Close > > >>>>> excel.Quit > > > > >>>>> *Error:* > > >>>>> C:\Ruby\bin>ruby C:\Ruby_Scripts\Ex_open.rb > > >>>>> C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open > > >>>>> (WIN32OLERuntimeError) > > >>>>> OLE error code:800A03EC in Microsoft Office Excel > > >>>>> 'D:\shiv.xls' could not be found. Check the spelling of the > file > > >>>>> name, and > > >>>>> verify that the file location is correct. > > >>>>> If you are trying to open the file from your list of most recently > used > > >>>>> files, m > > >>>>> ake sure that the file has not been renamed, moved, or deleted. > > >>>>> HRESULT error code:0x80020009 > > >>>>> Exception occurred. > > >>>>> from C:/Ruby_Scripts/Ex_open.rb:6 > > > > >>>>> Regards, > > >>>>> Shiv > > > > >>>>> -- > > >>>>> Before posting, please readhttp://watir.com/support. In short: > search > > >>>>> before you ask, be nice. > > > > >>>>> You received this message because you are subscribed
Re: [wtr-general] WIN32OLE.Open - runtime error
sorry,I did not get you...because what you are suggesting already exists..I mean my excel file shiv.xls is already in D-drive, I have used single quotes..you want me to use double quotes ? I have already done that it doesnt help On Thu, Jul 8, 2010 at 7:11 PM, SMF SMF wrote: > excel.Workbooks.Open(''D:\shiv.xls'') - change this line also and make > shiv.xls exist in D-drive > > > On Thu, Jul 8, 2010 at 6:55 PM, Basim Baassiri wrote: > >> is the d drive that you are specifying a network share? also, does the >> file exist with the correct spelling >> >> Basim >> >> >> On Thu, Jul 8, 2010 at 8:08 AM, Shiv wrote: >> >>> Thanks, BUT i get same error, I changed the 2nd line to >>> >>> excel = WIN32OLE::new('excel.application') >>> On Thu, Jul 8, 2010 at 5:09 PM, SMF SMF wrote: >>> >>>> Change 2nd line to as below- >>>> >>>> excel = WIN32OLE::new('excel.application') >>>> >>>> On Thu, Jul 8, 2010 at 5:00 PM, Shiv wrote: >>>> >>>>> Hello, >>>>> >>>>> I am trying to open a excel file and write data, but i m getting >>>>> runtime error >>>>> I checked the path is correct >>>>> new method works fine but open method throws error...can u pls help me >>>>> figure out this problem >>>>> >>>>> *Code:* >>>>> require 'win32ole' >>>>> excel = WIN32OLE.new('excel.application') >>>>> excel.visible = true >>>>> excel.Workbooks.Open('D:\shiv.xls') >>>>> excel.range('A1').value = 'Hello, world.' >>>>> excel.Close >>>>> excel.Quit >>>>> >>>>> >>>>> *Error:* >>>>> C:\Ruby\bin>ruby C:\Ruby_Scripts\Ex_open.rb >>>>> C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open >>>>> (WIN32OLERuntimeError) >>>>> OLE error code:800A03EC in Microsoft Office Excel >>>>> 'D:\shiv.xls' could not be found. Check the spelling of the file >>>>> name, and >>>>> verify that the file location is correct. >>>>> If you are trying to open the file from your list of most recently used >>>>> files, m >>>>> ake sure that the file has not been renamed, moved, or deleted. >>>>> HRESULT error code:0x80020009 >>>>> Exception occurred. >>>>> from C:/Ruby_Scripts/Ex_open.rb:6 >>>>> >>>>> Regards, >>>>> Shiv >>>>> >>>>> -- >>>>> 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 >>>>> >>>> >>>> -- >>>> 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 >>>> >>> >>> -- >>> 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 >>> >> >> -- >> 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 >> > > -- > 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 > -- 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] WIN32OLE.Open - runtime error
hi, d drive is not in network share, it is local drive of my machine shiv On Thu, Jul 8, 2010 at 6:55 PM, Basim Baassiri wrote: > is the d drive that you are specifying a network share? also, does the file > exist with the correct spelling > > Basim > > > On Thu, Jul 8, 2010 at 8:08 AM, Shiv wrote: > >> Thanks, BUT i get same error, I changed the 2nd line to >> >> excel = WIN32OLE::new('excel.application') >> On Thu, Jul 8, 2010 at 5:09 PM, SMF SMF wrote: >> >>> Change 2nd line to as below- >>> >>> excel = WIN32OLE::new('excel.application') >>> >>> On Thu, Jul 8, 2010 at 5:00 PM, Shiv wrote: >>> >>>> Hello, >>>> >>>> I am trying to open a excel file and write data, but i m getting runtime >>>> error >>>> I checked the path is correct >>>> new method works fine but open method throws error...can u pls help me >>>> figure out this problem >>>> >>>> *Code:* >>>> require 'win32ole' >>>> excel = WIN32OLE.new('excel.application') >>>> excel.visible = true >>>> excel.Workbooks.Open('D:\shiv.xls') >>>> excel.range('A1').value = 'Hello, world.' >>>> excel.Close >>>> excel.Quit >>>> >>>> >>>> *Error:* >>>> C:\Ruby\bin>ruby C:\Ruby_Scripts\Ex_open.rb >>>> C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open >>>> (WIN32OLERuntimeError) >>>> OLE error code:800A03EC in Microsoft Office Excel >>>> 'D:\shiv.xls' could not be found. Check the spelling of the file >>>> name, and >>>> verify that the file location is correct. >>>> If you are trying to open the file from your list of most recently used >>>> files, m >>>> ake sure that the file has not been renamed, moved, or deleted. >>>> HRESULT error code:0x80020009 >>>> Exception occurred. >>>> from C:/Ruby_Scripts/Ex_open.rb:6 >>>> >>>> Regards, >>>> Shiv >>>> >>>> -- >>>> 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 >>>> >>> >>> -- >>> 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 >>> >> >> -- >> 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 >> > > -- > 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 > -- 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] WIN32OLE.Open - runtime error
Thanks, BUT i get same error, I changed the 2nd line to excel = WIN32OLE::new('excel.application') On Thu, Jul 8, 2010 at 5:09 PM, SMF SMF wrote: > Change 2nd line to as below- > > excel = WIN32OLE::new('excel.application') > > On Thu, Jul 8, 2010 at 5:00 PM, Shiv wrote: > >> Hello, >> >> I am trying to open a excel file and write data, but i m getting runtime >> error >> I checked the path is correct >> new method works fine but open method throws error...can u pls help me >> figure out this problem >> >> *Code:* >> require 'win32ole' >> excel = WIN32OLE.new('excel.application') >> excel.visible = true >> excel.Workbooks.Open('D:\shiv.xls') >> excel.range('A1').value = 'Hello, world.' >> excel.Close >> excel.Quit >> >> >> *Error:* >> C:\Ruby\bin>ruby C:\Ruby_Scripts\Ex_open.rb >> C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open >> (WIN32OLERuntimeError) >> OLE error code:800A03EC in Microsoft Office Excel >> 'D:\shiv.xls' could not be found. Check the spelling of the file >> name, and >> verify that the file location is correct. >> If you are trying to open the file from your list of most recently used >> files, m >> ake sure that the file has not been renamed, moved, or deleted. >> HRESULT error code:0x80020009 >> Exception occurred. >> from C:/Ruby_Scripts/Ex_open.rb:6 >> >> Regards, >> Shiv >> >> -- >> 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 >> > > -- > 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 > -- 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] WIN32OLE.Open - runtime error
Hello, I am trying to open a excel file and write data, but i m getting runtime error I checked the path is correct new method works fine but open method throws error...can u pls help me figure out this problem *Code:* require 'win32ole' excel = WIN32OLE.new('excel.application') excel.visible = true excel.Workbooks.Open('D:\shiv.xls') excel.range('A1').value = 'Hello, world.' excel.Close excel.Quit *Error:* C:\Ruby\bin>ruby C:\Ruby_Scripts\Ex_open.rb C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open (WIN32OLERuntimeError) OLE error code:800A03EC in Microsoft Office Excel 'D:\shiv.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files, m ake sure that the file has not been renamed, moved, or deleted. HRESULT error code:0x80020009 Exception occurred. from C:/Ruby_Scripts/Ex_open.rb:6 Regards, Shiv -- 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] warning: method redefined; discarding old map
Hello, I am a newbie to the world of ruby, I am trying to run an example on keyword driven testing http://wiki.openqa.org/display/WTR/Demystifying+Keyword+Driven+Using+WATIR Problem I am facing is, I am getting this error when executing the program C:\Ruby\bin>ruby -w C:\Ruby_Scripts\Auto_Core\KDD_Ex.rb (eval):1: warning: method redefined; discarding old map (eval):1: warning: method redefined; discarding old area I could not find much help from google, but what I understand is same method is loaded twice which is causing this warning. These are the libraries which are used: #Include the Library require 'win32ole' require 'watir' require 'watir/ie.rb' require 'watir/screen_capture.rb' require 'C:\Ruby_Scripts\Auto_Core\KDD_Ex.rb' include Watir include Watir::ScreenCapture can you please give me a direction in solving this issue Thanks, Shiv -- 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: click image for given DIV ID
Bret Since we have customiztion on the 1.4 watir code, we not able to upgrade now. is there any tweak? Thanks Shiv On Dec 12, 7:20 am, Bret Pettichord wrote: > This is a bug in Watir 1.4. It is fixed in Watir 1.5 and Watir 1.6. Time > to upgrade. > > Bret > > > > Shiv wrote: > > Hi, > > > I want to click image for knownDIVID. Let say, I want to click > > image ofDIVIDf4 > > > My code is this and it doesn't work > > > $ie.div(:id,divid).image(:src, /tag_add.png/).click > > Error: failed undefined local variable or method `document' for > > # > > > To elaborate more on the issue, Its html page with 20 rows and one > > them will be higlighted/selected any given time(DIVclass="file- > > titleSelected" indicates it's a active/higlighted row). I want to > > click image belongs to this row. > > > Note: I am using watri 1.4 and so I can't use multiple param support > > > Thanks > > Shiv > > > https://k27/images/ > > tag_add.png" border="0" /> > > https://k27/images/ > > tag_add.png" border="0" /> > > https://k27/images/ > > tag_add.png" border="0" /> > > https://k27/images/ > > tag_add.png" border="0" /> > > https://k27/images/ > > tag_add.png" border="0" /> > > https://k27/images/ > > tag_add.png" border="0" /> > > https://k27/images/ > > tag_add.png" border="0" />- 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] click image for given DIV ID
Hi, I want to click image for known DIV ID. Let say, I want to click image of DIV ID f4 My code is this and it doesn't work $ie.div(:id,divid).image(:src, /tag_add.png/).click Error: failed undefined local variable or method `document' for # To elaborate more on the issue, Its html page with 20 rows and one them will be higlighted/selected any given time(DIV class="file- titleSelected" indicates it's a active/higlighted row). I want to click image belongs to this row. Note: I am using watri 1.4 and so I can't use multiple param support Thanks Shiv https://k27/images/ tag_add.png" border="0" /> https://k27/images/ tag_add.png" border="0" /> https://k27/images/ tag_add.png" border="0" /> https://k27/images/ tag_add.png" border="0" /> https://k27/images/ tag_add.png" border="0" /> https://k27/images/ tag_add.png" border="0" /> https://k27/images/ tag_add.png" border="0" /> --~--~-~--~~~---~--~~ 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] Earn some extra money , $3000 per months
http://www.AWSurveys.com/HomeMain.cfm?RefID=shivraj.jadhav14 Hi, Click on the link and do registration. This is the online survey site. When you do registration, it will create your own account. They will send some link in your account. When you click on that link it will open one website. You have to write your opinions about that website in only 3 lines. For one website survey they will give you $2 i.e. (Rs 98). http://www.AWSurveys.com/HomeMain.cfm?RefID=shivraj.jadhav14 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---