Skip to content

Instantly share code, notes, and snippets.

View ssmiech's full-sized avatar

Slawomir Smiechura ssmiech

View GitHub Profile
package test;
public class Test {
public static final Empty EMPTY = new Empty();
public static void main(String[] args) {
// first test instantiates the Empty class
Empty first_test = EMPTY;
System.out.println(String.format("inFirst test before changing state: %b", first_test.isLoading()));
@ssmiech
ssmiech / gist:6725324
Created September 27, 2013 07:39
zookepeer
Building native extensions. This could take a while...
ERROR: Error installing zookeeper:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
Building zkc.
tar xzf zkc-3.3.5.tar.gz 2>&1 && patch -p0 < patch-zookeeper 2>&1
patching file c/src/zookeeper.c
./configure --prefix=/usr/local/lib/ruby/gems/1.9.1/gems/zookeeper-1.4.4/ext --with-pic --without-cppunit --disable-dependency-tracking 2>&1
checking for doxygen... no
@ssmiech
ssmiech / Fonts.java
Created June 18, 2013 10:06
Element's font weight and color
package selenium;
import java.sql.Driver;
import java.util.List;
import java.util.concurrent.TimeUnit;
import selenium.Table;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
d = Selenium::WebDriver.for :chrome
d.get "http://www.flipkart.com/"
select = Selenium::WebDriver::Support::Select.new(d.first(:id, "fk-search-select"))
#What's selected now
select.selected_options[0].text
#Change selection by index:
select.select_by(:index, 2)
select.selected_options[0].text
package selenium;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;;