Using Google Chrome for Behat and Selenium2 Testing

This is rather quick. First of all, you need a fully working Behat and Selenium2 setup working, using Firefox as default. Once you achieved this, we can change it to use Google Chrome.

First, download chromedriver at https://code.google.com/p/selenium/wiki/ChromeDriver and put it somewhere like /data/lib/chromedriver. Once done, we run our Selenium2 java jar file like this:

java -jar selenium-server-standalone-2.44.0.jar -Dwebdriver.chrome.driver="/data/lib/chromedriver"

Then in our behat.yml file, we set the browser setting like this.

default:
    extensions:
        Behat\MinkExtension:
            base_url: someurl
            goutte: ~
            default_session: goutte
            javascript_session: selenium2
            browser_name: 'chrome'
            zombie:
                node_modules_path: 'somepath...'
            selenium2:                   
                capabilities: { "browserName": "chrome", "browser": "chrome", "version":  "29", 'chrome': {'switches':['--no-sandbox']}}

That’s it. It should launch Chrome instead of Firefox.

Posted in Uncategorized | Leave a comment

Static Files on OpenShift and WordPress

This blog just recently moved from PagodaBox to OpenShift due to some server issues. With a new infrastructure, there were changes in my WordPress installation where most of my static files stopped working. Reading the incomplete documentation didn’t help but … Continue reading

Posted in Linux, WordPress | Leave a comment

CSS – Elements covered by a container div not clickable

A link was covered by a div for some reason but although the link is visible, it is not click-able (partially). Hover is not working either. This is because the container div covering the link accepts all the clicks and … Continue reading

Posted in CSS, Web Development | Tagged , , | Leave a comment

Vagrant – CSS and JS broken when using shared folder

I have this problem with my CSS files getting broken encoding every time I make modifications on it on the shared folder in my host, where the shared folder is directly served by the VM’s HTTPD server (Apache). A quick … Continue reading

Posted in Apache, Linux, Web Development | Tagged , | Leave a comment

Sublime Text – Exclude Files or Directories from Go To Anything Feature

Tired of seeing unnecessary files from Sublime Text’s CTRL+P or Go To Anything search feature? Want to get rid of those generated files like minified CSS/JS or generated from templating engines? Want to get rid of them from search but … Continue reading

Posted in Web Development | Tagged | Leave a comment

Vagrant and CentOS 6.5 Guest – Port Forwarding Does Not Work for HTTPD

Been trying to setup port forwarding for this guest’s port 80 into host’s port 8080 in this vagrant setup but I can’t make it work for the past 5 hours. Playing around with Windows firewall does not give any hope. … Continue reading

Posted in Web Development | Tagged , | Leave a comment

Vagrant up failed with some weird errors

During my first week of setting up vagrant, got this weird error when running vagrant up. After some research on the internet, it turns out that the issue is caused by my VirtualBox version. Downgrading seems to be the best … Continue reading

Posted in Web Development | Tagged , | Leave a comment

Increasing sound of an MP3 file using lame

Is your mp3 file audio volume too low? Using lame MP3 encoder using your Linux box, it is just a one command away. See command below. We want an MP3 file to be 4 times louder then it was originally, … Continue reading

Posted in Linux | Tagged , , | Leave a comment

Cutting audio or video using ffmpeg

If you have installed ffmpeg on your linux box with dependencies installed as well, it is easy to cut video clips out of the original video using ffmpeg. This is useful when creating clips from your favorite movie scenes. It … Continue reading

Posted in Linux | Tagged , | Leave a comment

Centos and nginx – phpMyAdmin not working

With my default setup of Centos 6.5 64 bit and nginx 1.4.x, I got a strange error when setting up phpMyAdmin. It turns out that it was just a directory permission issue and that the default setup expects user it … Continue reading

Posted in Linux | Tagged , , , | 1 Comment