I am in a need of running my watir scripts headless. I browsed a lot and found that there is a headless gem for running scripts, but it is specific to linux. I am on windows 7 64-bit so I cannot make use of the headless gem. Is there any way that I can run my watir scripts headless on windows.?
I am using watir 2.0.4 and ruby 1.9.3. And one more thing is that it would be great if their is solution that can work on watir 2.0.4 because I would like to stick to it..
Thanks in advance.
I have got exactly what you are looking for, check it here. I have tried and tested it, its working fine.
It is super is easy to configure and its execution is faster than other GUI browsers.
Related
I am in need of a GUI toolkit that goes a little further than tk does, but my school's computers do not allow programs to run if they try to create/alter files on the local disk. Because of that, I need a portable GUI toolkit for Windows. Does anybody know of one?
Green Shoes, just install the gem, copy it along with your Ruby map to a stick and you are off to go.
gem install green_shoes
http://ashbb.github.com/green_shoes/App.html
a simple sample
require 'green_shoes'
Shoes.app{
e = edit_line
button("Click me!"){alert("You entered #{e.text}")}
}
Qt4 and ruby-qt (the qtbindings gem works beautifully to get the ruby bindings)
For graphical applications in Ruby, I personally prefer JRuby + Swing. Presumably your school's computers have a JRE installed... perhaps you can run JRuby from your flash drive?
I see you haven't yet accepted an answer, so i try another suggestion.
Again, you only need a Gem, Watir in this case.
Your browser is the GUI.
Here a question i asked and the answer i accepted
http://stackoverflow.com/questions/11724201/use-browser-as-gui-in-ruby
That example uses IE but the other browsers are possible too, this solution is cross-browser and cross OS
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 want to run in the browser a ruby application using ncurses.
To do that, I can use JRuby; but what do I replace ncurses with ?
I am thinking of running JRuby as an applet as decribed here. I have also found some Jave
code 1 that does ncurses-like interface but I do not know how do I integrate it with JRuby.
I think it will be very hard to get something similar to ncurses in JRuby due to this particular issue that's been plaguing Java for ages. Please post in this thread if you'd like to see this fixed in the future.
http://bugs.sun.com/bugdatabase/view%5Fbug.do?bug%5Fid=6351276
I've been using Win32OLE extensively with MRI to automate MS Office. It works great, but I'm thinking of switching to JRuby to simplify installing apps on users' systems.
With Win32OLE officially in JRuby 1.6, how well does it work? Should I be able to port my MRI-based app straight to JRuby without modification? Any hitches I should look out for?
Thanks.
We do have a win32ole extension built into JRuby. In fact, we also sport the only 64-bit version.
If you do find a bug or missing method or feature, please file an issue at http://bugs.jruby.org/ .
I like using Selenium RC for automating interaction with webpages that require JavaScript, except for the fact that it goes through launching an full instance of Firefox to run a script. Questions:
Is there a way to run Selenium RC so that it launches a headless version of Firefox that doesn't create a window? I'm using OS X. I know there is a way to do this using Xvfb on a Linux server, but I'm wondering how this would be done on OS X.
Is there any lighter weight alternative to Selenium RC? The tool would have to execute any JavaScript on a webpage and alter the DOM accordingly. I'm not too familiar with Spidermonkey; but can it be used for this purpose? Thanks.
There's a well supported Java one called HtmlUnit, which is completely headless - there is no GUI. It runs Javascript.
If you don't want to directly call Java, you can in theory run Selenium with HtmlUnit as its backend headlessly - I haven't got it to work yet though.
Also, you might find Selenium 2 better than Selenium RC. It has the WebDriver built in, and looks like it is going to be better and more complete.
Finally, you could run Selenium remotely on your own separate Linux server, and call it from the Mac remotely. Or you can use a service like Sauce Labs.