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
@RunWith(Arquillian.class) | |
// when this annotation is omitted, images will be saved into | |
// default location, like target/screenshots | |
@SaveScreenShotsTo("target/my-screenshots/ArquillianScreenShooterTestCase/") | |
// when no @TakeScreenShots are specified on method, this one will be used by default | |
@TakeScreenShots(BeforeAsserts.class) | |
public class ArquillianScreenShooterTestCase { | |
@Drone WebDriver driver |
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 java.io.File; | |
import java.io.IOException; | |
import com.android.ddmlib.AndroidDebugBridge; | |
import com.android.ddmlib.IDevice; | |
import com.android.ddmlib.RawImage; | |
import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener; | |
import java.awt.Dimension; | |
import java.awt.image.BufferedImage; |
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 void retrieveOTPPath(FragmentActivity activity, Callback<List<OTP>> callback) throws Exception { | |
AuthenticationModule authModule = authenticator.get("login", activity); | |
URL url = new URL(baseURL); | |
Pipeline pipeline = new Pipeline(url); | |
PipeConfig pipeConfig = new PipeConfig(url, OTP.class); | |
pipeConfig.setAuthModule(authModule); | |
pipeConfig.setEndpoint("/auth/otp/secret"); |
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
<profile> | |
<id>jboss-staging-repository-group</id> | |
<repositories> | |
<repository> | |
<id>jboss-staging-repository-group</id> | |
<name>JBoss Staging Repository Group</name> | |
<url>https://repository.jboss.org/nexus/content/groups/staging</url> | |
<layout>default</layout> | |
<releases> |
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
@Deployment | |
@Instrumentable | |
public statit Archive<?> mobilePhoneDeployment() | |
{ | |
return some apk you want to test | |
} | |
@Deployment | |
@Targets("jboss") |
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 void removeAllActivitiesForDrone(@Observes BeforeDroneDestroyed event) { | |
InjectionPoint<?> injectionPoint = event.getInjectionPoint(); | |
Object drone = droneContext.get().getDrone(injectionPoint); | |
if (RemoteWebDriver.class.isAssignableFrom(drone.getClass())) { | |
WebDriverConfiguration configuration = droneContext.get() | |
.getDroneConfiguration(injectionPoint, WebDriverConfiguration.class); |
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
(E) AfterClass | |
(I) TestContextHandler.createSuiteContext | |
(I) TestContextHandler.createClassContext | |
(E) TestClass | |
(O) ClientBeforeAfterLifecycleEventExecuter.on | |
(O) ContainerEventController.execute | |
(E) ContainerMultiControlEvent | |
(O) ContainerDeployController.undeployManaged | |
(E) UnDeployDeployment | |
(I) ContainerDeploymentContextHandler.createContainerContext |
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 AndroidDronePointFilter implements DronePointFilter { | |
@Override | |
public boolean accept(DroneContext context, DronePoint<?> dronePoint) { | |
DronePointContext<?> dronePointContext = context.get(dronePoint); | |
if (dronePointContext.hasConfiguration() && dronePoint.conformsTo(WebDriver.class)) { | |
if (dronePointContext.isInstantiated()) { | |
if (dronePoint.conformsTo(AndroidDriver.class)) { | |
return true; |
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
/* | |
* JBoss, Home of Professional Open Source | |
* Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual | |
* contributors by the @authors tag. See the copyright.txt in the | |
* distribution for a full listing of individual contributors. | |
* | |
* 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 |
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
ProcessInteraction interaction = new ProcessInteractionBuilder(). | |
replyTo("Do you wish to create a custom hardware profile \\[no\\]") | |
.with("no" + System.getProperty("line.separator")) | |
.build(); | |
Tasks.prepare(CommandTool.class).interaction(interaction).command(command).execute().await(); |
OlderNewer