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 | |
public void iamfiguringout(){ | |
FirefoxDriver driver = new FirefoxDriver(); | |
Selenium s = new WebDriverBackedSelenium(driver, "http://www.google.com"); | |
Reporter.log("WDBS object created", true); | |
s.open("http://www.google.co.in/"); | |
Reporter.log("URL opened", true); | |
String url = "window.open('intl/en/about.html','mywindow');"; | |
s.openWindow("intl/en/about.html", "mywindow"); | |
Reporter.log("new window opened", true); |
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.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.Map; | |
import org.openqa.selenium.Capabilities; | |
import org.openqa.selenium.Proxy; | |
import org.openqa.selenium.WebDriverBackedSelenium; | |
import org.openqa.selenium.remote.CapabilityType; | |
import org.openqa.selenium.remote.Command; | |
import org.openqa.selenium.remote.DesiredCapabilities; |
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.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.openqa.grid.common.GridRole; | |
import org.openqa.grid.common.RegistrationRequest; | |
import org.openqa.grid.common.SeleniumProtocol; | |
import org.openqa.grid.internal.utils.GridHubConfiguration; | |
import org.openqa.grid.internal.utils.SelfRegisteringRemote; |
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
{ | |
"capabilities": | |
[ | |
{ | |
"browserName":"firefox", | |
"acceptSslCerts":true, | |
"javascriptEnabled":true, | |
"takesScreenshot":true, | |
"firefox_profile":"", | |
"maxInstances":5 |
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 org.testng.annotations.Test; | |
@Test | |
public class AmDependent { | |
public void methodD() { | |
System.out.println(this.getClass().getSimpleName() | |
+ ".method D : Thread ID : " + Thread.currentThread().getId()); | |
} |
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.BufferedInputStream; | |
import java.io.IOException; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import org.apache.pdfbox.pdfparser.PDFParser; | |
import org.apache.pdfbox.util.PDFTextStripper; | |
public class PlayWithPDF { |
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
1. create a ‘~/.ssh/config’ file with the following content; | |
# | |
# All hosts defaults | |
# | |
Host * | |
Protocol 1,2 | |
FallBackToRsh no | |
ForwardAgent yes | |
ForwardX11 yes | |
PasswordAuthentication yes |
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
<html> | |
<body> | |
<form> | |
<input type="button" name="clickMe" value="Go" onclick="confirm('Really?');showModalDialog('demo1.html', 'The Page says', 'dialogWidth:370px;dialogHeight:155px;status=no;help=no;border=thin;');"/> | |
</form> | |
</body> | |
</html> |
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.test.listeners; | |
import org.openqa.selenium.server.RemoteControlConfiguration; | |
import org.openqa.selenium.server.SeleniumServer; | |
import org.testng.ISuite; | |
import org.testng.ISuiteListener; | |
import org.testng.Reporter; | |
public class SeleniumStarterListener implements ISuiteListener { | |
private static SeleniumServer server = null; |
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.test; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.support.events.EventFiringWebDriver; | |
import org.testng.annotations.Test; |
OlderNewer