Skip to content

Instantly share code, notes, and snippets.

View freynaud's full-sized avatar

François Reynaud freynaud

  • Element34 Solutions GmbH
  • Altendorf, Switzerland
View GitHub Profile
@freynaud
freynaud / NodeRecoveryTest
Created April 26, 2011 17:48
debug kevin issue
package org.openqa.grid.e2e.selenium;
import org.openqa.grid.e2e.utils.GridConfigurationMock;
import org.openqa.grid.internal.Registry;
import org.openqa.grid.internal.RemoteProxy;
import org.openqa.grid.selenium.SelfRegisteringRemote;
import org.openqa.grid.selenium.utils.GridConfiguration;
import org.openqa.grid.web.Hub;
import org.openqa.selenium.net.PortProber;
@freynaud
freynaud / gist:952126
Created May 2, 2011 18:50
1586 patch
### Eclipse Workspace Patch 1.0
#P selenium
Index: java/server/src/org/openqa/grid/internal/TestSession.java
===================================================================
--- java/server/src/org/openqa/grid/internal/TestSession.java (revision 12076)
+++ java/server/src/org/openqa/grid/internal/TestSession.java (working copy)
@@ -15,44 +15,52 @@
*/
package org.openqa.grid.internal;
@freynaud
freynaud / TestSession.java
Created May 2, 2011 20:14
consume content for entity
/*
Copyright 2007-2011 WebDriver committers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@freynaud
freynaud / gist:966263
Created May 11, 2011 10:38
Issue1558
package org.openqa.grid.e2e.misc;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.grid.e2e.utils.GridConfigurationMock;
import org.openqa.grid.internal.Registry;
import org.openqa.grid.selenium.SelfRegisteringRemote;
import org.openqa.grid.web.Hub;
import org.openqa.selenium.By;
@freynaud
freynaud / Launcher.java
Created May 17, 2011 15:25
cannot find IP
import java.net.InetAddress;
import java.net.UnknownHostException;
public class Launcher {
/**
* @param args
*/
public static void main(String[] args) {
InetAddress addr;
@freynaud
freynaud / SmokeTest.java
Created May 17, 2011 17:41
trying to reproduce Kevin bug.
package org.openqa.grid.e2e.selenium;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
package org.openqa;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
@freynaud
freynaud / InvocCountTimeout.java
Created May 17, 2011 20:56
2nd method passes ?
public class InvocCountTimeout {
@Test(invocationCount=5,timeOut=1000)
public void willFailOk() throws InterruptedException{
Thread.sleep(2000);
}
@Test(invocationCount=5,threadPoolSize=5,timeOut=1000)
public void willPassBug() throws InterruptedException{
Thread.sleep(2000);
private static SeleniumServer server;
private static int port;
@BeforeClass
public static void prepare() throws Exception {
port = PortProber.findFreePort();
RemoteControlConfiguration config = new RemoteControlConfiguration();
config.setPort(port);
server = new SeleniumServer(config);
server.boot();
{"class":"org.openqa.grid.common.RegistrationRequest",
"capabilities":
[
{"platform":"ANY","browserName":"firefox","version":""},
{"platform":"ANY","browserName":"firefox","version":""},
{"platform":"ANY","browserName":"firefox","version":""},
{"platform":"ANY","browserName":"firefox","version":""},
{"platform":"ANY","browserName":"firefox","version":""},
{"platform":"WINDOWS","ensureCleanSession":true,"browserName":"internet explorer","version":""},