Skip to content

Instantly share code, notes, and snippets.

View reinaldorossetti's full-sized avatar

Reinaldo Rossetti reinaldorossetti

View GitHub Profile
@semutmerah
semutmerah / TestSwipe.robot
Last active July 5, 2024 10:51
Demo Scroll Down / Scroll Up using Swipe keyword in Robot Framework
*** Settings ***
Library AppiumLibrary 15 run_on_failure=Log Source
Library Process
Suite Setup Spawn Appium Server
Suite Teardown Close Appium Server
Test Teardown Close Application
*** Variables ***
## Go here to download the apk for the app used in this test -> https://drive.google.com/file/d/19FxLjux8ZtumweXzBA_CYrL0Va-BL4gY/view?usp=sharing
@reinaldorossetti
reinaldorossetti / index.html
Last active January 21, 2017 21:49 — forked from anonymous/index.html
Tic Tac Toe game
<html>
<head>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="script.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="tic-tac-toe">
<div class="span3 new_span">
@ellisonleao
ellisonleao / renavam.py
Created December 21, 2016 18:13
Validador Renavam Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
def validar_renavam(renavam):
"""
No caso do RENAVAM, o DV (dígito verificador) módulo 11 é calculado
multiplicando cada dígito do número base pela sequência de multiplicadores
2, 3, 4, 5, 6, 7, 8, 9, 2 e 3, posicionados da direita para a esquerda.
@florentbr
florentbr / #drag-drop.py
Last active March 9, 2023 14:48
Selenium - HTML5 drag and drop
from selenium import webdriver
import time
# JavaScript: HTML5 Drag and drop script
# param1 (WebElement): Source element to drag
# param2 (WebElement): Optional - target element for the drop
# param3 (int): Optional - Drop offset x relative to the target if any or source element
# param4 (int): Optional - Drop offset y relative to the target if any or source element
# param4 (int): Optional - Delay in milliseconds (default = 1ms) for dragging and dropping
# param5 (string): Optional - Key pressed (alt or ctrl or shilf)
@kenrett
kenrett / Selenium Cheat Sheet.md
Last active May 25, 2023 01:28
Selenium Cheat Sheet - Ruby

#Getting Started

##Webpage:

<html>
<head>
    <title>Testing with Ruby and Selenium WebDriver</title>
</head>
 
<body bgcolor="antiquewhite">
@tomas-stefano
tomas-stefano / Capybara.md
Last active July 3, 2024 12:47
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
from selenium import webdriver
from selenium.webdriver.common.by import By
class Page(object):
"""
Base class that all page models can inherit from
"""
def __init__(self, selenium_driver, base_url='https://test.axial.net', parent=None):
self.base_url = base_url
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@chriskiehl
chriskiehl / Vitual keystroke example
Created June 10, 2012 15:08
Python win32api simple Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,