Re: [wtr-general] Can watir-webdriver save picture of an element?
On Fri, Apr 26, 2013 at 5:20 AM, Christian songyangyang2...@gmail.comwrote: I want to save a picture of an element like a button If you are using watir-classic: browser.image.save(c:/foo/bar.jpg) More information: http://rdoc.info/gems/watir-classic/Watir/Image#save-instance_method If you are using watir-webdriver, it is not implemented yet: http://rdoc.info/gems/watir-webdriver/Watir/Image#save-instance_method Željko -- https://leanpub.com/watirbook -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Can watir-webdriver save picture of an element?
Thank you. 在 2013年4月26日星期五UTC+8下午3时59分02秒,Željko Filipin写道: On Fri, Apr 26, 2013 at 5:20 AM, Christian songyang...@gmail.comjavascript: wrote: I want to save a picture of an element like a button If you are using watir-classic: browser.image.save(c:/foo/bar.jpg) More information: http://rdoc.info/gems/watir-classic/Watir/Image#save-instance_method If you are using watir-webdriver, it is not implemented yet: http://rdoc.info/gems/watir-webdriver/Watir/Image#save-instance_method Željko -- https://leanpub.com/watirbook -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] watir installation issues
Hi all, After a successful upgrade from an old version of watir and ruby I am attempting to create a new vm test rig running the latest ruby and watir. It's a fresh install of windows 7 so I'm using the watirbook instructions as directed and following them as specified, or so I thought but I don't appear to be getting the watir gem installed. When I require watir I get the message cannot load such file -- watir/loader. After carrying out gem install watir I get a few gems including commonwatir and watir webdriver. I have seen a few posts in groups about similar messages for the webdriver but not watir except really old posts (as far as I can see). I'm assuming my previous attempt worked as I already had a watir gem installed, all be it an old one. Next I tried to install webdriver to see if that helped. gem install watir-webdriver successfully installed irb require watir-webdriver true browser = Watir::Browser.new :ie WebDriverError: Unable to find standalone executable Is there a step Im missing or has anyone else had similar difficulties? Versions I'm using: Ruby 2.0.0-p0 DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe *** LOCAL GEMS *** bigdecimal (1.2.0) childprocess (0.3.9) commonwatir (4.0.0) ffi (1.8.1 x86-mingw32) io-console (0.4.2) json (1.7.7) mini_portile (0.5.0) minitest (4.3.2) multi_json (1.7.2) psych (2.0.0) rake (0.9.6) rdoc (4.0.0) rubygems-update (2.0.3) rubyzip (0.9.9) selenium-webdriver (2.32.1) test-unit (2.0.0.0) watir-webdriver (0.6.3) websocket (1.0.7) win32-api (1.4.8 x86-mingw32) win32-process (0.7.2) windows-api (0.4.2) windows-pr (1.2.2) -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] watir installation issues
Thanks for the speedy reply but it's still not quite there. I rushed in at first with gem install watir-classic which didn't appear to do anything before checking that it should've been gem install watir watir-classic so I tried that, but my gem list still doesn't include watir or watir-classic? On Friday, 26 April 2013 11:21:00 UTC+1, Željko Filipin wrote: Hi, comments are inline. On Fri, Apr 26, 2013 at 12:10 PM, gary mrgary...@googlemail.comjavascript: wrote: It's a fresh install of windows 7 so I'm using the watirbook instructions as directed and following them as specified, or so I thought but I don't appear to be getting the watir gem installed. When I require watir I get the message cannot load such file -- watir/loader. I think I wrote the instructions before we had watir-classic gem. Try installing watir-classic and watir-webdriver gems. browser = Watir::Browser.new :ie WebDriverError: Unable to find standalone executable At the time when I wrote the instructions IE driver for watir-webdriver was included with the gem. Now you have to download IEdriver separately: https://code.google.com/p/selenium/wiki/InternetExplorerDriver https://code.google.com/p/selenium/downloads/list Željko -- https://leanpub.com/watirbook -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] watir installation issues
On Fri, Apr 26, 2013 at 12:49 PM, gary mrgaryengl...@googlemail.com wrote: I rushed in at first with gem install watir-classic which didn't appear to do anything before checking that it should've been gem install watir watir-classic so I tried that, but my gem list still doesn't include watir or watir-classic? I do not understand what you did and what the problem is. Either join #watir channel on freenode and ping zeljkof or post command line output of what you did with code that demonstrates the problem. Željko -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Save Link As with Watir
Hi, does anyone know how I could download a file to a specific folder with Watir and Chrome? I have a link to a pdf file and I'd like to download to a specific folder and change the file name in the process, preferably in the Save As dialog. Cheers Aidy -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Save Link As with Watir
On Fri, Apr 26, 2013 at 1:44 PM, Adrian Killens ack...@googlemail.comwrote: I have a link to a pdf file and I'd like to download to a specific folder and change the file name in the process, preferably in the Save As dialog. I think the easiest way would be to disable save as popup in chrome, download the file by just clicking the link and then rename the file. Željko -- https://leanpub.com/watirbook -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] watir installation issues
hurrah found it, details posted below in case anyone else encounters the same problem ok, summarising from the top installed ruby 2.0.0 using installer from command prompt, gem update --system downloaded appropriate devkit extracted devkit to c:\devkit from command prompt, devkit folder, ruby dk.rb init then ruby dk.rb install from command prompt, gem install watir from command prompt, gem install watir-webdriver at this point I came to the halt which I originally posted from command prompt, gem install watir-classic (my incorrect guess) from command prompt, gem install watir watir-classic (taken from the link you sent) next to check if it worked from command prompt, irb DL is deprectaed, please use Fiddle irb(main):001:0require watir LoadError: cannot load such file watir When I view my gem list again as before, from a command prompt gem lst my gem list appears as before, there is no watir gem listed, I'm assuming there should be a watir gem listed in my gem list? tried to install watir again and spotted an error message Failed to build gem native extension along with a handy link : nokogiri.org/tutorials/installing_nokogiri.html where I found another gem to try back to command prompt; gem install nokogiri and try watir again; gem install watir hurrah, both watir and watir-classic are now in my gem list, along with a few more from command prompt, irb DL is deprectaed, please use Fiddle irb(main):001:0require watir =true result! thanks again for your input Željko -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Re: Internet Explorer - watir-webdriver question
Thanks so much for your suggestion Jim. I'm trying some different experiments based on your feedback. Have a great weekend and thank you for your assistance. Best Regards, Alan On Thursday, April 25, 2013 12:01:08 PM UTC-5, Jim Evans wrote: Just a wild guess, but are you running on 64-bit Windows 7? What version of IEDriverServer.exe are you running, 32-bit or 64-bit? IE, or any process, for that matter, can't load a cross-bitness .dll (an ActiveX control is a .dll with some specific API endpoints built into it). So if your ActiveX control is a 32-bit ActiveX control, you won't see it when you start 64-bit IE. For the same reason, the bitness version of IE that gets launched by IEDriverServer.exe (and therefore by watir-webdriver) is determined by the bitness of the executable. --Jim On Thursday, April 25, 2013 12:52:13 PM UTC-4, Alan May wrote: Hi, I understand that Watir doesn't support ActiveX controls.(I have read the FAQ entry and several posts on this matter). I think Watir is an incredibly useful tool for web application testing and I've had good results with using it on various projects. Please bear with me for a brief thought exercise: I've been just experimenting with using watir to lead me through a web flow until the point that I come to an Internet Explorer specific control (spawns a separate window) (I am thinking this is probably based in ActiveX technology... I had to install an .exe file on my client to access the functionality and the functionality is only visible in Internet Explorer.) My tenative plan is to use Ruby to interact with the ffi gem or, somewhat more crudely, invoke a java class that leverages the java.awt.Robot.class to finish the necessary flow. Working in Windows 7, I have noticed something I didn't anticipate when I invoke: c:\Program Files\Internet Explorer\iexplore.exe // the control doesn't seem to be recognized as installed (the app is checking for the installed software at the beginning of its flow) However, If I invoke: start iexplore.exe // the control appears to be loaded and works as anticipated. When I load the IE browser(version 9.0.8) through webdriver, I get the behavior I see when I invoke iexplore.exe without the start directive. I was going to also try the original Watir IE driver and attempt the same thing with Selenium (and potentially try other frameworks if I exhaust those options), but just wanted to check with this group beforehand in case anyone had any suggestions. I don't have direct access to the source code, so white box approaches won't work in this situation. I looked at the command line switches for Internet Explorer 9, and there is a switch for disabling loading add-ons, but I didn't see anything else that might appear useful. Anyway, I was just curious if anyone had had success with using a similar approach/technique or could give me any guidance. I'm a bit stuck if the control isn't accessible at all (for instance if I have watir bring up the browser, and I step through the flow manually from that point). I wasn't sure if the issue with being able to have IE load applets, activeX controls --- and --- once you have them loaded, not having a mechanism to recognize and click widgets (since they aren't native web form controls, links, etc.) --- OR if it was just the latter issue. Is anyone aware of a potential workaround for the loading issue? Thanks for your time! Alan -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.