This file contains 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.paddypower.selenium.framework; | |
import com.paddypower.reporter.ReporterFactory; | |
import org.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.WebDriver; | |
import java.io.IOException; | |
import java.io.InputStream; | |
public class TouchAction { |
This file contains 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.openqa.selenium.Capabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import java.net.URL; | |
import java.util.concurrent.TimeUnit; | |
public final class DriverFactory { | |
private RemoteWebDriver remoteWebDriver = null; |
This file contains 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 org.uiautomation.ios.grid; | |
import org.openqa.grid.selenium.GridLauncher; | |
public class DebugGrid { | |
public static void main(String[] args) throws Exception { | |
String[] a = {"-port", "4444", | |
"-capabilityMatcher", "org.uiautomation.ios.grid.IOSCapabilityMatcher", | |
"-role", "hub"}; |
This file contains 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
Troubleshooting configuration issues: | |
1) MobileSafari.app/Info.plist (Permission denied) | |
error starting instrument for session XXX, Cannot change the default device for the app. | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/ | |
iPhoneSimulator6.0.sdk/Applications/MobileSafari.app/Info.plist (Permission denied) | |
Safari's Info.plist file contains the device family safari can be launched on. | |
It looks like : "UIDeviceFamily":[1,2] | |
1 is for iphone. 2 is for ipad. |
This file contains 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
IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains", "1.1"); | |
cap.setCapability(IOSCapabilities.SIMULATOR, false); | |
cap.setCapability(IOSCapabilities.DEVICE, DeviceType.iphone); | |
RemoteIOSDriver driver = new RemoteIOSDriver(new URL("http://localhost:5555/wd/hub"), cap); | |
driver.logElementTree(new File("test.png"), false); |
This file contains 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
String name = "PP_Login"; | |
String value = customer.getToken(); | |
String domain = Utils.getAppServer(); | |
String path = "/"; | |
Cookie cookie = new Cookie(name, value, domain, path, null); | |
driver.manage().addCookie(cookie); | |
driver.navigate().refresh(); |
This file contains 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 BasicTest { | |
private MacSessionFactory session; | |
private PPCustomer customer; | |
//Basic Tests Before Test Setup | |
@BeforeTest | |
public void beforeTest() { | |
//get the rack details [db, urls etc] we're connecting to | |
RackDataFactory.getRackDataFactory().init(getRackDataFromDb("qa1")); |
This file contains 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.paddypower.automation.selenium.framework; | |
import com.paddypower.automation.reporter.MessageType; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import static com.paddypower.automation.selenium.reporter.SeleniumReporterFactory.getSeleniumReporter; |
This file contains 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.paddypower.ecommerce.grid.servlets; | |
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import org.openqa.grid.common.exception.GridException; | |
import org.openqa.grid.internal.ProxySet; | |
import org.openqa.grid.internal.Registry; | |
import org.openqa.grid.internal.RemoteProxy; | |
import org.openqa.grid.web.servlet.RegistryBasedServlet; |
This file contains 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
[INFO] | |
[INFO] --- rspec-maven-plugin:1.0:spec (test) @ SeleniumGridExtras --- | |
[DEBUG] org.codehaus.mojo:rspec-maven-plugin:jar:1.0: | |
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:compile | |
[DEBUG] org.jruby:jruby-complete:jar:1.6.7:compile | |
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime | |
[DEBUG] Created new class realm plugin>org.codehaus.mojo:rspec-maven-plugin:1.0 | |
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:rspec-maven-plugin:1.0 | |
[DEBUG] Imported: < maven.api | |
[DEBUG] Populating class realm plugin>org.codehaus.mojo:rspec-maven-plugin:1.0 |
OlderNewer