Skip to content

Instantly share code, notes, and snippets.

@seaders
seaders / PersistentWebdriver.py
Created May 26, 2013 20:05 — forked from dnedbaylo/PersistentWebdriver.py
Valid for newest selenium and pep8 compliant.
from selenium import webdriver
from selenium.webdriver.remote.remote_connection import RemoteConnection
from selenium.webdriver.remote.errorhandler import ErrorHandler
class PersistentWebdriver (webdriver.Remote):
def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=None, browser_profile=None, proxy=None,
In order to take part in the Unity Activity sharing system, there are a few steps you will need to take outlined below. First, some background. You can signify which class you would like to receive all the Activity lifecycle methods. When you implement the methods they should have the exact same signature but they should be *public static void*. That is important! They will not be called if they are not public static void. You can implement 1 or all of the methods. That is entirely up to your needs.
1. Download the Prime31UnityActivity.jar file from here: https://app.box.com/s/xw6hq1ltjaniycc14j21 You are free to distribute the file but *do not change it's name*! That would defeat the purpose of the sharing mechanism!
2. Implement any of the methods that are available in this Gist (https://gist.github.com/prime31/10747997)
3. Perform the AndroidManifest changes below
If successful, on app launch you will see a log that looks like the following:
public static void onCreate( Bundle savedInstanceState )
public static void onActivityResult( int request, int response, Intent data )
public static void onNewIntent( Intent intent )
public static void onStart()
public static void onStop()