Setting up chrome/firefox in linux based x86_64 EC2 instance In this post we'll see how to setup chrome/firefox in EC2 instance. Further we'll discuss the way to setup chromedriver with selenium [java] in EC2 instance aswell. Why is that difficult? Linux based EC2 instances lack gtk+ , which is a must to launch any GUI enabled applications. How to solve? Compile gtk+ from source. This gist by joekiller has the complete dependency tree resolved for installing gtk+ for x86_64 machines. Line 77 Basically installs firefox from its tarball. You can comment it out incase if you don't wish to. Incase Line 42 fails. Do a wget for direct tarball from here , instead the complex recursive wget. For Ex: wget http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/firefox-18.0.2.tar.bz2 So, All done? Nopes, Now we can't run either of the browsers as we lack X11 server which does graphics operations & screen outputing. As our envir...
This post is updated inorder to support phpcassa 1.0.a.1 Cassandra Composite Type using PHPCassa phpcassa 1.0.a.1 uses namespaces in PHP which is supported in PHP 5 >= 5.3.0 Make sure you have the relavant package. The script mentioned below is the copy of PHPCassa Composite Example I will explain it step by step (1) Creating Keyspace using PHPCassa Name => "Keyspace1" Replication Factor => 1 Placement Strategy => Simple Strategy (2) Creating Column Family with Composite Keys using PHPCassa Name => "Composites" Column Comparator => CompositeType of LongType, AsciiType (Ex: 1:example) Row Key Validation => CompositeType of AsciiType, LongType (Ex: example:1) ...
Phewww getting back to blog after almost an year. So, am back to discuss an interesting node module selenium-webdriver [Ref: Project Doc and npm registry ] Am assuming the reader has prior knowledge on what nodejs , npm and node modules are. And a little bit of selenium fun ;) What is selenium? As wiki says, Selenium is a portable software testing framework for web applications. It is a prominently used tool for browser automation. For further details checkout SeleniumHQ . What are we doing here? Basically Selenium provides bindings in many languages like java, python, php and now even nodejs. Here am planning to run through few code samples of using selenium webdriver in nodejs. Where to start? im@mylaptop$ npm install --save selenium-webdriver A Simple Webdriver Example // Import Selenium Dependency var Webdriver = require('selenium-webdriver'); // Few Settings var PAGE_LOAD_TIMEOUT_MS = 10000; var SCRIPT_LOAD_TIMEOUT_MS = 1000; var WINDOW_WIDTH_PX = 1024; v...
Really nice :)
ReplyDelete