Currently we are installing our setup(.exe file) on daily basis for testing purpose.I want to automate my installation using Ruby or Watir.Is it possible to automate? Please help me how to perform and give your suggestions.
There are many libraries available for Ruby. Watir itself is constrained to the web browser. Although it does have some technology it's built on top of that should allow Windows environment control. Some of the libraries you can try are Win32-autogui, RAutomation, and windows-pr to name a few.
If you are installing for testing purposes, you can use autoit. It will run your installer, and you can handle some unexpected (though anticipated) errors. I wouldn't use autoit for testing, just for setting up to test.
Related
I want to automate the browse and upload file in my application.Ruby(2.0) that I am using does not let me handle the local system's windows. Is there any ruby gem that allows us to handle local system's windows?
Watir is for automating Browsers, not Operating Systems. Each OS is going to be different, so anything that might help you automate them will also be unique.
For Windows you might see if something like this will do what you need. (Note I've not used this project and recommend avoiding doing OS level automation if possible).
I want to write ruby script which run browser (for example, firefox), open web-addresses, click links, check/uncheck boxes and other stuff. What gem can i use for that?
Selenium / Selenium Ruby is another option and there's Selenium IDE for scripting Firefox.
"It is implemented as a Firefox extension, and allows you to record,
edit, and debug tests."
Check watir and watir_webdriver which is used for automated web browser testing but it can be used for browser scripting from ruby http://watir.com/
you can use the rb-appscript framework to automate macosx
http://appscript.sourceforge.net/rb-appscript/index.html
Its a ruby framework that uses the applescript interfaces to interact with the macos applications.
I'm not sure if there is a gem you can use to install yet but there is are install instructions in the link above.
there is a nice article at http://www.apeth.com/rbappscript/00intro.html that shows how to replace applescript with ruby using rb-appscript
Check out watir, watir-webdriver or firewatir. It's very easy to use especially if you're just starting out. You can check out this quick tutorial on how to set it up, it's extremely easy.
http://webmites.org/watir-automated-tests-for-everyone/
I'm working on building a GUI for my checkers implementation. I'm utilizing a GUI framework that only works with Ruby 1.8, yet my game engine, which I have packaged as a gem, only works with Ruby 1.9.
I can't change the code for the GUI framework and reworking my game engine to make it compatible with 1.8 is undesirable, to say the least.
I'm using RVM though, and it looks like you can write RVM scripts to change Ruby versions on the fly.
Does anyone have any experience with that or what the script might look like?
You could run it in two processes. Give the GUI a 1.8 process and talk to it via a shared db or an API on the other side. That's how I'd do it. The good part about that is you can have on online version of your game as well because other clients will be able to talk to it as well.
You can't run one app with two versions of Ruby. How do you imagine this?
RVM has an ability to automatically change current ruby when you cd into a directory. Just create in that directory a file called .rvmrc with content like
rvm use 1.8.7
I have designed a custom Windows application in C#. Now, I would like to automate it using Win32OLE library in Ruby. I have absolutely no experience in using Win32OLE, so I would like to know when I create a new Win32OLE object using:
customApp= WIN32OLE.new('MyApp.Application')
it gives an error since it returns a null Win32OLE object.
Do I need to have a COM file for my application? If so, why is it needed? Also, could someone point me to all the files required by my custom application before I start trying to automate it using Win32OLE.
What exactly do you want to automate? If its by simple actions (tab,enter,etc. mimic the keyboard plus waits for some windows actions) you can use AutoIt.
http://codesnippets.joyent.com/posts/show/829
Everything starts with:
require "win32ole"
au3 = WIN32OLE.new("AutoItX3.Control")
It comes as a requirement of the rubygem watir. But you can see if there a more simple way to install autoit (its a .dll) for your ruby needs.
Hi i am serching for the best way to distribute ruby software (can be open or commercial) to clients:
- with less software installed on client (only ruby interpreter)
- without less user interaction for updates
Any idea? I can use gem but it needs to install rubygems and not fit with commercial software.
I recommend setting up a ruby project using Jeweler (http://github.com/technicalpickles/jeweler) and distributing on Gemcutter (http://gemcutter.org/) which is pretty much the standard for gem distribution.
You may also want to look at BitNami's RubyStack multi-platform installer if you're looking for an easy way to get Ruby, RubyGems and some common gems installed. They also make installable stacks for some common apps (e.g. Typo), but unfortunately they don't offer a way to build a custom installer for your Ruby application.
Are you looking for a way to distribute to the desktop or to a headless server?
For the desktop you could try RubyScript2Exe and also check out the article Distributing Ruby Applications
You might also want to consider using JRuby and packaging the software as a Java application.