Skip to content

Instantly share code, notes, and snippets.

View DominikDary's full-sized avatar

Dominik Dary DominikDary

View GitHub Profile
package com.ebay.mobile.tests;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class Tests {
@BeforeClass
public void setup() {
System.out.println("setup");
@DominikDary
DominikDary / selendroidSource.json
Created February 10, 2014 12:50
Sample of selendroid's source format. <code>driver.getPageSource()</code> returns a json reply that contains e.g. the source code of the the webview and as well a generated xml source of the activity. The generated xml will be used to apply xpath expressions. A screenshot of the corresponding Inspector can be found here: https://dl.dropboxuserco…
{
"id": "[DecorView]",
"data": "[DecorView]",
"children": [{
"id": "[LinearLayout]",
"data": "[LinearLayout]",
"children": [{
"id": "[ViewStub]-action_mode_bar...",
"data": "[ViewStub]-action_mode_bar...",
"attr": {
@DominikDary
DominikDary / selendroidWebViewSource.xml
Created February 11, 2014 10:21
UI dump if the web view activity. use: adb shell uiautomator dump
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<hierarchy rotation="0">
<node index="0" text="" class="android.widget.FrameLayout" package="io.selendroid.testapp" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][480,800]">
<node index="0" text="" class="android.widget.LinearLayout" package="io.selendroid.testapp" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][480,800]">
<node index="0" text="" class="android.widget.FrameLayout" package="io.selendroid.testapp" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,38][480,76]">
<node
@DominikDary
DominikDary / selendroid-repl.adoc
Last active August 29, 2015 13:56
Short article on using python to build a repl for selendroid.

selendroid repl

This document describes how to setup a repl for selendroid based on Python. It uses the Selenium Python bindings.

Overview

  • Installion and Configuration

  • Use the repl with selendroid

[INFO]
[INFO] --- maven-surefire-plugin:2.14-SNAPSHOT:test (tck-tests) @ arquillian-jbossas-remote-6 ---
[INFO] Surefire report directory: /home/aslak/dev/source/testing/arquillian-container-jbossas/jbossas-remote-6/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.arquillian.tck.container.cdi_1_0.CDIBeanLookupWarTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.866 sec
Running org.arquillian.tck.container.servlet_2_5.MultipleWebContextLookupMultiWarTestCase
@DominikDary
DominikDary / NettyWaitForElementTest.java
Created July 20, 2014 11:53
Test to verify the wait mechanism works fine in selendroid with the new netty implementation.
/*
* Copyright 2014 eBay Software Foundation and selendroid 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 distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
@DominikDary
DominikDary / keybase.md
Created December 12, 2014 08:32
keybase

Keybase proof

I hereby claim:

  • I am dominikdary on github.
  • I am dominikdary (https://keybase.io/dominikdary) on keybase.
  • I have a public key whose fingerprint is B570 0B33 42CE C2BE D82A 624D EB15 D56C 8A5E EB31

To claim this, I am signing this object:

#!/usr/bin/perl
#
# Pre-commit hook for running checkstyle on changed Java sources
#
# To use this you need:
# 1. checkstyle's jar file somewhere
# 2. a checkstyle XML check file somewhere
# 3. To configure git:
# * git config --add checkstyle.jar <location of jar>
# * git config --add checkstyle.checkfile <location of checkfile>
#!/bin/bash
#
# This script runs a given command over a range of Git revisions. Note that it
# will check past revisions out! Exercise caution if there are important
# untracked files in your working tree.
#
# This came from Gary Bernhardt's dotfiles:
# https://github.com/garybernhardt/dotfiles
#
# Example usage:
/**
*
*/
package io.selendroid.standalone.server.handler;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;