Skip to content

Instantly share code, notes, and snippets.

Dominik Dary DominikDary

Block or report user

Report or block DominikDary

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DominikDary
DominikDary / NettyWaitForElementTest.java
Created Jul 20, 2014
Test to verify the wait mechanism works fine in selendroid with the new netty implementation.
View NettyWaitForElementTest.java
/*
* 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
View console.log
[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 / selendroid-repl.adoc
Last active Aug 29, 2015
Short article on using python to build a repl for selendroid.
View selendroid-repl.adoc

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

@DominikDary
DominikDary / selendroidWebViewSource.xml
Created Feb 11, 2014
UI dump if the web view activity. use: adb shell uiautomator dump
View selendroidWebViewSource.xml
<?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 / selendroidSource.json
Created Feb 10, 2014
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…
View selendroidSource.json
{
"id": "[DecorView]",
"data": "[DecorView]",
"children": [{
"id": "[LinearLayout]",
"data": "[LinearLayout]",
"children": [{
"id": "[ViewStub]-action_mode_bar...",
"data": "[ViewStub]-action_mode_bar...",
"attr": {
View Issue260.java
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");
View startMobileWebSelendroidSession.sh
curl -d '{"desiredCapabilities":{"browserName":"android","emulator":True,"androidTarget":"ANDROID16"}}' http://localhost:4444/wd/hub/session
@DominikDary
DominikDary / 10-18.java
Created Jan 29, 2014
configure android web view proxy
View 10-18.java
//Source: http://stackoverflow.com/a/18453384
public static boolean setProxy(WebView webview, String host, int port) {
// 3.2 (HC) or lower
if (Build.VERSION.SDK_INT <= 13) {
return setProxyUpToHC(webview, host, port);
}
// ICS: 4.0
else if (Build.VERSION.SDK_INT <= 15){
return setProxyICS(webview, host, port);
}
View special_keys_selendroid.py
from selenium import webdriver;
from selenium.webdriver.common.action_chains import ActionChains;
driver=webdriver.Remote(desired_capabilities={'aut': 'io.selendroid.testapp:0.8.0-SNAPSHOT','emulator':True}) ;
chain = ActionChains(driver);
""" Send search key, enter the text "Selendroid" and press the "Enter key" """
chain.send_keys(u'\ue103'+'Selendroid'+u'\ue007').perform();
View bug213.py
from selenium import webdriver;
driver = webdriver.Remote(desired_capabilities=webdriver.DesiredCapabilities.ANDROID)
driver.get("http://www.meteofrance.com/mf3-rpc-portlet/html/redirection.html")
touch =webdriver.TouchActions(driver)
el=driver.find_element_by_link_text("Non")
touch.tap(el).perform()
You can’t perform that action at this time.