This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| File tempDir = TemporaryFilesystem.getDefaultTmpFS().createTempDir("userprofile", "copy"); | |
| try { | |
| File certdb = new File(tempDir, "cert8.db"); | |
| writeResourceToFile(certdb, "cert8.db", Demo.class); | |
| // Delete the old compreg.dat file so that our new extension is | |
| // registered | |
| File compreg = new File(tempDir, "compreg.dat"); | |
| if (compreg.exists()) { | |
| if (!compreg.delete()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| driver = new RemoteWebDriver(new URL("http://10.250.57.219:4444/wd/hub"), cap); | |
| driver.get("http://www.ebay.co.uk"); | |
| Augmenter a = new Augmenter(); | |
| driver = a.augment(driver); | |
| TakesScreenshot s = (TakesScreenshot)driver; | |
| File tmp = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); | |
| tmp.renameTo(new File("c:\\tmp\\ss2.png")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import java.net.URL; | |
| import org.openqa.selenium.OutputType; | |
| import org.openqa.selenium.TakesScreenshot; | |
| import org.openqa.selenium.WebDriver; | |
| import org.openqa.selenium.remote.Augmenter; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| import org.openqa.selenium.server.RemoteControlConfiguration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Eclipse Workspace Patch 1.0 | |
| #P selenium | |
| Index: java/client/src/org/openqa/selenium/firefox/internal/NewProfileExtensionConnection.java | |
| =================================================================== | |
| --- java/client/src/org/openqa/selenium/firefox/internal/NewProfileExtensionConnection.java (revision 11993) | |
| +++ java/client/src/org/openqa/selenium/firefox/internal/NewProfileExtensionConnection.java (working copy) | |
| @@ -65,7 +65,7 @@ | |
| this.process = binary; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Eclipse Workspace Patch 1.0 | |
| #P selenium | |
| Index: java/server/src/org/openqa/jetty/jetty/servlet/AbstractSessionManager.java | |
| =================================================================== | |
| --- java/server/src/org/openqa/jetty/jetty/servlet/AbstractSessionManager.java (revision 12340) | |
| +++ java/server/src/org/openqa/jetty/jetty/servlet/AbstractSessionManager.java (working copy) | |
| @@ -479,16 +479,16 @@ | |
| if (_random==null) | |
| { | |
| log.debug("New random session seed"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test(timeout=2000,expected=Exception.class) | |
| public void test(){ | |
| methodNewerReturning(); | |
| } | |
| private void methodNewerReturning(){ | |
| while(true){ | |
| try { | |
| Thread.sleep(1000); | |
| } catch (InterruptedException e) { | |
| // TODO Auto-generated catch block |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class testNG { | |
| @Test | |
| public void m1(){ | |
| System.out.println("m1"); | |
| } | |
| @DataProvider(name = "test1") | |
| public Object[][] createData1() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @DataProvider(name = "test1") | |
| public Object[][] createData1() { | |
| return new Object[][] { { "passed", true }, { "failed", false }, }; | |
| } | |
| @Test( dataProvider = "test1") | |
| public void m2(String a, boolean b) { | |
| System.out.println("m2:" + a + "," + b); | |
| if (!b) { | |
| throw new RuntimeException("horrible bug"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class IPTroubleShoot { | |
| public static void main(String[] args) { | |
| current(); | |
| test(); | |
| } | |
| public static void current() { | |
| InetAddress addr; | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.ebay.spine.selenium; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import org.mortbay.jetty.Server; | |
| import org.mortbay.jetty.nio.SelectChannelConnector; | |
| import org.mortbay.jetty.webapp.WebAppContext; | |
| import org.openqa.grid.selenium.SelfRegisteringRemote; | |
| import org.openqa.grid.selenium.utils.SeleniumProtocol; |