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
//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); | |
} |
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
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(); |
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
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() |
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 unittest | |
from selenium import webdriver | |
class Bug167(unittest.TestCase): | |
def setUp(self): | |
desired_capabilities = {'aut': 'io.selendroid.testapp:0.7.0','androidTarget':'ANDROID19'} | |
self.driver = webdriver.Remote( |
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
#!/usr/bin/python | |
# Copyright 2011 Software Freedom Conservancy. | |
# | |
# 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
#--- | |
# iPIN - iPhone PNG Images Normalizer v1.0 | |
# Copyright (C) 2007 | |
# | |
# Author: | |
# Axel E. Brzostowski | |
# http://www.axelbrz.com.ar/ | |
# axelbrz@gmail.com | |
# | |
# References: |
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
/* | |
* Copyright 2012-2013 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 |
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
''' | |
@author: Dominik Dary | |
''' | |
import unittest | |
from selenium import webdriver | |
class FindElementTest(unittest.TestCase): | |
def setUp(self): |
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 static void driverLogs(WebDriver driver, String className, String methodName) { | |
LogEntries logs; | |
try { | |
logs = driver.manage().logs().get("logcat"); | |
} catch (Exception e) { | |
return; | |
} catch (OutOfMemoryError e) { | |
System.out.println("failed to get logcat due to OOM current max memory:" + Runtime.getRuntime().maxMemory() + | |
" current free memory: " + Runtime.getRuntime().freeMemory() ); | |
return; |
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
from selenium import webdriver | |
d=webdriver.Remote(command_executor='http://localhost:5555/wd/hub', desired_capabilities={"aut":"io.selendroid.testapp:0.5.0-SNAPSHOT","emulator":bool(0)}) |