Skip to content

Instantly share code, notes, and snippets.

View vrunoa's full-sized avatar
:electron:
Se dice: A-TO-MICO

Bruno vrunoa

:electron:
Se dice: A-TO-MICO
View GitHub Profile
@vrunoa
vrunoa / virtualbox-vagrant-nuclear-option.sh
Created September 11, 2018 05:27 — forked from tjbenton/virtualbox-vagrant-nuclear-option.sh
Completely uninstall VirtualBox and Vagrant and reinstall through brew
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup
[Appium] Welcome to Appium v1.9.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"browserName":"","appiumVersion":"1.8.1","deviceName":"Android GoogleApi Emulator","platformVersion":"8.0","launchTimeout":35000,"platformName":"Android","app":"http://appium.s3.amazonaws.com/ContactManager.apk","prevent-requeue":true,"name":"Basic android native test (Android GoogleApi Emulator on Android 8.0)","avdName":"O-phone-gms-portrait-appium","locale":"es_AR","language":"es"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"","appiumVersion":"1.8.1","deviceName":"Android GoogleApi Emulator","platformVersion":"8.0","launchTimeout":35000,"platformName":"Android","app":"http://appium.s3.amazonaws.com/ContactManager.apk","prevent-requeue":true,"name":"Basic android native test (Android GoogleApi Emulator on Android 8.0)","avdName":"O-phone-gms-portrait-appium","locale":"es_AR","language":"es"},null,null]
[d
@vrunoa
vrunoa / gist:3f197ba6eb8c2ae81c99f86fd7736c46
Last active June 13, 2019 06:22
appium-getting-started
  1. Setup your local environment for Android local testing - max 45minutes

  2. Download https://developer.android.com/studio, go to command-line

  3. Setup env vars

export ANDROID_HOME="~/Library/Android/sdk"
export ANDROID_SDK_ROOT="~/Library/Android/sdk"
export ANDROID_AVD_HOME="~/.android/avd"
import json
import sys
import os
import re
import unittest
from appium import webdriver
from time import sleep
from os.path import basename
import os
from selenium.webdriver.support.ui import WebDriverWait
@vrunoa
vrunoa / build.gradle
Created January 19, 2016 09:13
Running appium test from gradle
apply plugin: 'com.android.application'
apply plugin: 'maven'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.urucas.appiumtests"
minSdkVersion 10
@vrunoa
vrunoa / gist:8a6a1240a913045ce8945489dce34936
Created November 15, 2021 18:35
video-to-gif-using-ffmpeg
ffmpeg -i video.mp4 -vf "fps=10,scale=1024:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 webdriver-test.gif
@vrunoa
vrunoa / jniChar2jbyteArray.cpp
Last active August 25, 2022 15:12
Convertng char* to jbyteArray the right way
JNIEXPORT jbyteArray JNICALL Java_com_urucas_test_getframes(JNIEnv* env, jobject thiz) {
__android_log_write(ANDROID_LOG_INFO, "Test", "getting frames");
char* frame;
int len;
processor->getFrames(&frame, &len);
jbyteArray arr = env->NewByteArray(len);
env->SetByteArrayRegion(arr, 0, len, reinterpret_cast<jbyte*>(&frame));
delete processor;
return arr;
}