Using Capybara with Headless in Windows OS - ruby

I am using headless gem to run Capybara without opening browser in Linux. Headless uses xvfb. Is there something similar for Windows OS or Mac?

Both capybara-webkit and poltergeist run just fine on a mac.
Poltergeist uses phantomjs to do the heavy lifting, which is available on windows so poltergeist could probably be made to work there, although its documentation says windows isn't supported.
Capybara-webkit lists 32bit windows as a community supported platform, so it should hopefully work there.

Related

kubernetes can you install an entire OS in a pod? And perform selenium tests

So i'm trying to find a good way of testing the Safari web browser. I've been looking at kubernetes which seems like a good fit for most browser testing for browsers such as Chrome or Firefox with Selenoid or Moon. Safari is a different beast however. It seems like you need to install the entire OS just to test the browser. So what would be a good solution to this? Should i even bother with a cluster?
No you cannot install safari in container.
Safari can be installed only on MacOS, but unfortunately, you cannot run full OS in a container.
Even if you could, I could not help you because MacOS is a proprietary software and macos licence doesn't allow for installing macOS on devices other then Apple's.

How to launch chrome/chromium browser from win PE?

I'm Looking for a method to launch chrome app from Microsoft Win PE.
Is it chrome supported that feature.
There is no installer for WinPE you need a portable version of a browser. I've tried the portable version of Chrome but couldn't get it to run in WinPE. The only browser I've ever seen work in WinPE is an old portable version of FireFox.
If you want to try to get it to work here's the link
https://portableapps.com
In theory it should work but I can't tell what dependencies it needs as there's no error message. The portable apps are x86 so you have use WinPE_x86.

How To Write Acceptance Tests for Internet Explorer with: Selenium, PHPUnit and Mac OS X?

I'm trying to write acceptance tests for a project using multiple browsers. All the tests run fine with: Firefox, Chrome and Safari.
However, I don't know how to run them in Internet Explorer. I use: PHPUnit, Selenium and Mac OS X. I also use VirtualBox with Windows 8 and Windows XP.
I was thinking of running the tests in the virtual machine but I would have to copy the test to the VM and run them from there.
Is there a better way to do it?
Thanks in advance.
In general you have 2 opportunities:
To use cloud-based test execution platform which supports Selenium like following ones:
https://www.browserstack.com
https://saucelabs.com/
http://crossbrowsertesting.com/
http://testingbot.com/
To use the solution with virtual maschine you're already using. Even in this case you can optimize your approach by using specially prepared OS image exclusively for Internet Explorer testing from IE6 to IE11 from here.

Providing Firefox 28 programatically for Selenium Webdriver (w/ ruby)

Selenium-webdriver gem versions require specific firefox versions (always a lagging a bit, understandably). See: Unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)
In this case, I require firefox 28 for gem version 2.41.0 (2014-03-28). See: http://selenium.googlecode.com/git/rb/CHANGES
My problem is I have Firefox 32 installed (up to date as of current). I need to provide a stable environment for my script which will likely run on other systems too. I can easily lock the gem version through bundler, but how do I provide Firefox 28 consistently across environments? Is it possible to ask selenium webdriver to use a local firefox 'installation'?
I am on Ubuntu but I would greatly prefer a more general solution. This is the install I would use for my system: http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/linux-x86_64/en-US/
It is possible to configure Selenium to use a different firefox install:
Selenium::WebDriver::Firefox.path = "/path/to/firefox"
Now I can download the required version, put it somewhere, and have Selenium use it.

Is there any crossplatform GUI for Ruby that is easy to install on Mac OS?

I have some ruby scripts for end users that will be nice to have some GUI. Some of users use Windows, some Mac OS X (Snow Leopard, Lion). So i need some kind of cross-platform GUI that my users can easily install. For Windows where is built-in Tk and a number of gems that can be installed as easy as gem install wxRuby. But on MacOS i have some problems:
No built-in Tk due to 64-it nature of Snow Leopard+ and no easy way to install it.
qtRuby4 gem does not exist for Mac OS X at all.
gtk2 gem is native and fails to build on Mac OS X Snow Leopard+
wxruby gem install but will not work on 64-bit Snow Leopard+, scripts need to be executed manually in 32-bit mode.
Maybe someone can suggest some distribution / way to install GUI toolkit for ruby that will be easy to install for end users for both Windows and Mac OS X Snow Leopard / Lion? Or the wxRuby is the only way and i need to somehow make sure that end users execute scripts in 32-bit mode?
I haven't used it, but Shoes may fit the bill.
There was a Ruby GUI survey in 2008, which would need an update. Maybe it's still interesting though:
http://www.pressure.to/ruby_gui_survey/
IMHO from your list your best bet is wxRuby, sans the 32-bit limitation. An alternative way would be to wrap up your application as a lightweight web app using something like Sinatra, starting a server on localhost and telling the user where to go in the browser. That is if doing GUIs in JavaScript is your thing.
Ok, for now it seems that the easiest way will be to use Ruby-GNOME2. The instruction to configure ruby for OSX will be to install macports via standard .dmg installer and execute one command:
sudo -s "port selfupdate; port install ruby; gem install gtk2"
Of course installing something is not very user-friendly, but manual tinkering with 32-bit / 64-bit interpreter execution for wxRuby afraids me more. That will require either to modify end user system or to add some kind of bootstrapper into each script so it will check if executed on 64-bit macos and in such case relaunch itself in 32-bit interpreter.

Resources